-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[receiver/prometheus] set user agent #21914
Conversation
@@ -281,7 +282,12 @@ func (r *pReceiver) initPrometheusComponents(ctx context.Context, host component | |||
if err != nil { | |||
return err | |||
} | |||
r.scrapeManager = scrape.NewManager(&scrape.Options{PassMetadataInContext: true}, logger, store) | |||
r.scrapeManager = scrape.NewManager(&scrape.Options{ |
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.
Is there any means we can test this within the project?
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.
I was hoping to avoid duplicating most of testComponent to test this
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.
I've added a test
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.
I wanted to make sure that this doesn't regress again in future.
Description:
Sets the user-agent when the prometheus receiver performs scrapes
Link to tracking Issue: #21910
Testing: run collector locally and log request:
Documentation: changelog