New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Malformed JSON in query API result, 2.52-rc.0 regression #14040
Comments
I just had a quick look at the source code. it seems that comma is missing in the marshal functions, I'd like to work on the fix. |
I think it's ready to be reviewed. this is my first time contributing to an open source project, it's a big step for me. please let me know if there's something wrong with the pull request or the code. |
Agreed, thanks for spotting the problem. |
Fixed by #14047 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What did you do?
$ curl 'http://localhost:19092/api/v1/query?query=process_cpu_seconds_total&time=1714716585.782'; echo
{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"process_cpu_seconds_total","instance":"localhost:19092","job":"prometheus"},"value":[1714716585.782,"0.29"]}{"metric":{"__name__":"process_cpu_seconds_total","job":"a","instance":"baz:20702"},"value":[1714716585.782,"2125535.148752446"]}]}}
Notice a missing comma between array elements.
What did you expect to see?
$ curl 'http://localhost:19091/api/v1/query?query=process_cpu_seconds_total&time=1714716585.782'; echo
{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"process_cpu_seconds_total","job":"a","instance":"baz:20702"},"value":[1714716585.782,"23600372.135197595"]},{"metric":{"__name__":"process_cpu_seconds_total","instance":"localhost:19092","job":"prometheus"},"value":[1714716585.782,"1.2"]}]}}
What did you see instead? Under which circumstances?
See above.
It looks like there are missing comas.
Works fine in 2.51.2
System information
Linux amd64
Prometheus version
Prometheus configuration file
The text was updated successfully, but these errors were encountered: