-
Notifications
You must be signed in to change notification settings - Fork 422
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
#3315 - upgrade prometheus client java to 1.1.0 #3325
#3315 - upgrade prometheus client java to 1.1.0 #3325
Conversation
...ometheus-metrics/src/main/scala/sttp/tapir/server/metrics/prometheus/PrometheusMetrics.scala
Outdated
Show resolved
Hide resolved
...ometheus-metrics/src/main/scala/sttp/tapir/server/metrics/prometheus/PrometheusMetrics.scala
Outdated
Show resolved
Hide resolved
...ometheus-metrics/src/main/scala/sttp/tapir/server/metrics/prometheus/PrometheusMetrics.scala
Outdated
Show resolved
Hide resolved
Thanks! This looks good :) I left a couple of minor comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments. Next push will address all of them
...ometheus-metrics/src/main/scala/sttp/tapir/server/metrics/prometheus/PrometheusMetrics.scala
Outdated
Show resolved
Hide resolved
...ometheus-metrics/src/main/scala/sttp/tapir/server/metrics/prometheus/PrometheusMetrics.scala
Outdated
Show resolved
Hide resolved
...ometheus-metrics/src/main/scala/sttp/tapir/server/metrics/prometheus/PrometheusMetrics.scala
Outdated
Show resolved
Hide resolved
It seems that compiling the docs has failed - probably some updates are needed there as well |
Yeah. I saw the pipelines failing. I'm running locally to see how I can fix it |
… packages due to the upgrade of the java client
Thanks! |
Trying to use the bridge provided by prometheus to not have the need of upgrading the old client produced a bug reported in #3315.
I upgraded the prometheus java client following the instructions to refactor the instrumentation code to the version 1.1.0 which is the latest one today and was released 5 days ago.
I also modified the assertions of the
PrometheusMetricsTest
suite. Instead of just validating that there is an exact string contained in the metrics generated, I changed for regex. This is because the test started to failed. When I checked what was the issue, the problem was that the labels were in different order. The regex applied will validate that the metric has a name and some labels with values no matter the order they have. The same happens with the ones that were validating that the comments such as# HELP tapir_request_total Total HTTP requests
. It seems that with the new client if there is no value for that metric, the text will not be showedCloses #3315