-
Notifications
You must be signed in to change notification settings - Fork 486
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
Attach Agent ID to remote-write requests #5999
Conversation
…in data dir for flow.
@@ -0,0 +1,135 @@ | |||
package agentseed |
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 a way to make this work for otelcol.exporter.* components?
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.
Unclear at present. I'd assume there's some mechanism for including metadata, even though it may not be over http. Needs more research.
* pull out agentseed package for reading and storing uuid. Also put it in data dir for flow. * add uid header to prometheus.remote_write and loki.write * init func * cleaner api with fewer edge cases * add to pyroscope * compile * add to static remote write * add to static mode loki write * remove return from write. we never need it. * move loki write out of convert function * move out of prometheus convert function * static prom, get out of defaults function * static logs: take out of defaults function * constant for header. Work done in init with sync.once. Hardening * added some tests * maybe fix tests * testmain? * changelog
* pull out agentseed package for reading and storing uuid. Also put it in data dir for flow. * add uid header to prometheus.remote_write and loki.write * init func * cleaner api with fewer edge cases * add to pyroscope * compile * add to static remote write * add to static mode loki write * remove return from write. we never need it. * move loki write out of convert function * move out of prometheus convert function * static prom, get out of defaults function * static logs: take out of defaults function * constant for header. Work done in init with sync.once. Hardening * added some tests * maybe fix tests * testmain? * changelog
Refactorings to agent seed handling
internal/agentseed
package that can be used anywhere.Get
api. If we cannot read or write the file, worst case is we generate a new uid and use it only for the lifetime of this process.UID to outbound headers
X-Agent-ID
header to outbound reequests fromprometheus.remote_write
loki.write
pyroscope.write
This header will be sent in the http headers only to remote writes you have configured.