quarkus: Trailing comma is lost from prometheus metrics
Describe the bug
In all released versions (including 2.15.3.Final), prometheus metrics (accessible at ‘q/metrics’) has format of json object with a trailing comma. In the current main branch (tested on dc85cd0d16c44a264507529c9ee26e26c7ffe175) the format is changed, and the comma was lost. Is this an expected change? Prometheus format allows[1] for both options, but that change may broke parsing of logs and therefore it would be nice to have it documented
[1] https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators
Expected behavior
Example:
http_server_requests_seconds_count{method="GET",outcome="SUCCESS",status="200",uri="/hello",} 1.0
Actual behavior
http_server_requests_seconds_count{method="GET",outcome="SUCCESS",status="200",uri="/hello"} 6.0
How to Reproduce?
mvn io.quarkus.platform:quarkus-maven-plugin:2.15.3.Final:create -DprojectGroupId=org.acme -DprojectArtifactId=micrometer-quickstart -Dextensions='resteasy-reactive,micrometer-registry-prometheus'cd micrometer-quickstartmvn quarkus:dev -Dquarkus.platform.version=999-SNAPSHOTcurl http://localhost:8080/hello/curl http://localhost:8080/q/metrics | grep http_server_requests_seconds_count # example, many (all?) other metrics also changed
for comparision, replace step 3 with mvn quarkus:dev -Dquarkus.platform.version=2.15.3.Final
Output of uname -a or ver
6.0.18-300.fc37.x86_64
Output of java -version
17.0.4, vendor: GraalVM Community
GraalVM version (if different from Java)
No response
Quarkus version or git rev
dc85cd0d16c44a264507529c9ee26e26c7ffe175
Build tool (ie. output of mvnw --version or gradlew --version)
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Additional information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (14 by maintainers)
Commits related to this issue
- Fix error in daily runs See https://github.com/quarkusio/quarkus/issues/30343 for details — committed to fedinskiy/quarkus-test-suite by fedinskiy a year ago
- Fix error in daily runs See https://github.com/quarkusio/quarkus/issues/30343 for details — committed to fedinskiy/quarkus-test-suite by fedinskiy a year ago
- Trailing comma is no longer present, quarkusio/quarkus#30343 — committed to rsvoboda/beefy-scenarios by rsvoboda a year ago
- Adapt to the new format of Prometheus metrics Starting from Quarkus 2.16, the trailing comma was dropped from Prometheus metrics This change either allows tests to use both options, or disables them ... — committed to fedinskiy/quarkus-test-suite by fedinskiy a year ago
- Trailing comma is no longer present, quarkusio/quarkus#30343 — committed to quarkus-qe/beefy-scenarios by rsvoboda a year ago
- Adapt to the new format of Prometheus metrics Starting from Quarkus 2.16, the trailing comma was dropped from Prometheus metrics This change either allows tests to use both options, or disables them ... — committed to quarkus-qe/quarkus-test-suite by fedinskiy a year ago
- Use accept header to choose metics export format Fixes #30343 (cherry picked from commit 1191b165fe771b545fbe21e4bf582273cf8c0d29) — committed to quarkusio/quarkus by jtama a year ago
- Update all non-major dependencies (mulk/mulkcms2!13) This MR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [flow-bin](https://github.com/flowtype/flow-bin)... — committed to benkard/mulkcms2 by benkard a year ago
- Trailing comma is no longer present in Micrometer Prometheus See https://github.com/quarkusio/quarkus/issues/30343 for details — committed to gtroitsk/quarkus-test-suite by gtroitsk a year ago
- parent ff5751750e6166419f78b5b4af295ee5868a80cf author Jose Carranza <jcarranz@redhat.com> 1686853189 +0200 committer Jose Carranza <jcarranz@redhat.com> 1688565488 +0200 adding some veretx http cove... — committed to jcarranzan/quarkus-test-suite by jcarranzan a year ago
- parent ff5751750e6166419f78b5b4af295ee5868a80cf author Jose Carranza <jcarranz@redhat.com> 1686853189 +0200 committer Jose Carranza <jcarranz@redhat.com> 1688565488 +0200 adding some veretx http cove... — committed to jcarranzan/quarkus-test-suite by jcarranzan a year ago
- parent ff5751750e6166419f78b5b4af295ee5868a80cf author Jose Carranza <jcarranz@redhat.com> 1686853189 +0200 committer Jose Carranza <jcarranz@redhat.com> 1688565488 +0200 adding some veretx http cove... — committed to jcarranzan/quarkus-test-suite by jcarranzan a year ago
- fix httpClient test Bump quarkus-qpid-jms from 2.2.0 to 2.3.0 Bumps [quarkus-qpid-jms](https://github.com/amqphub/quarkus-qpid-jms) from 2.2.0 to 2.3.0. - [Commits](https://github.com/amqphub/quarku... — committed to jcarranzan/quarkus-test-suite by jcarranzan a year ago
Ok so that’s what trigger’s a 406: https://github.com/quarkusio/quarkus/blob/16722066cc92bbd1962c2d050864672db2f1ae29/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/export/PrometheusRecorder.java#L28
So I have something running, I can put up a PR.