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

Provide a way to get UserAgent #716

Merged
merged 1 commit into from
Nov 7, 2024
Merged

Conversation

mmorel-35
Copy link
Contributor

@mmorel-35 mmorel-35 commented Nov 7, 2024

In Prometheus, the userAgent is calculated the same way in several places:

https://github.com/search?q=repo%3Aprometheus%2Fprometheus%20userAgent&type=code

This exposes a function that can be used instead

import "github.com/prometheus/common/version"

version.UserAgent()

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SuperQ SuperQ merged commit ee5cc87 into prometheus:main Nov 7, 2024
7 checks passed
@mmorel-35 mmorel-35 deleted the user-agent branch November 7, 2024 08:41
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.

None yet

2 participants