Skip to content
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

Merged

Conversation

gastonschabas
Copy link
Contributor

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 showed

Closes #3315

@adamw
Copy link
Member

adamw commented Nov 17, 2023

Thanks! This looks good :) I left a couple of minor comments

Copy link
Contributor Author

@gastonschabas gastonschabas left a 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

@adamw
Copy link
Member

adamw commented Nov 17, 2023

It seems that compiling the docs has failed - probably some updates are needed there as well

@gastonschabas
Copy link
Contributor Author

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
@adamw adamw merged commit 79f504b into softwaremill:master Nov 20, 2023
12 checks passed
@adamw
Copy link
Member

adamw commented Nov 20, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] prometheus metrics can't be exposed with new client_java using promehteus bridge
2 participants