Skip to content

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.

2 participants