-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
value and from_context not working for header_setter otel extension. #24682
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Did I understand it correctly: you have two collectors running. The first collector sends data to the second collector. Is it correct? If so, the configuration of the first collector could look like this:
The configuration of the second collector:
The first collector receives data in otlp format, sets header "X-Scope-OrgID: test-env" and exports data to the second collector. The second collector receives "X-Scope-OrgID: test-env" and propagates this header to Loki. Is it what you want to achieve? Let me know if it helps |
hi @mar4uk , let me clarify again for you, there is agent and collector scenario, where agent send data to collector and collector process the data. different agents installed on different kubernetes cluster, set X-Scope-OrgID as env value and collector receives data from all those agents , decode it and send it to respective env folder in loki remote storage (s3). but value and from_context is not working to get value from header. let me know , if you need more info. thanks |
Thank you for the clarification. The agent is the collector, right? You just call it an agent to distinguish two collectors, right? In the example configs I posted value and from_context are working to get value from the header. The first config is for an agent. Isn't it what you try to achieve? header propagation works for that example |
hi, the shared config is not working to set value from resource attributes, which I passed as test-env. I'm expecting the value to be fetch from resource attributes not the field itself. ` headers_setter:
` |
I'm not sure we can use the resource attribute that is set in the processor in the extension. Need to double-check it. But the docs say:
I assume |
Extensions don't have direct access to pipeline data. It can come only as connection metadata (ie, request header), or static values. |
Closing based on @jpkrohling's comment. Please let us know if there's anything else we can help with! |
Component(s)
exporter/loki, extension/headerssetter
What happened?
hi team,
i'm not able to set value of resource attributes which are passes in header from agent.
we have agents and collector architecture, where agent is configured to set header level values as X-Scope-OrgID as env name and those are used at collector level to looked up from the value property of the extension configuration.
I tried with value and from_context in collector level , but folder are not creating in s3 as per values set in tenant_id , i'm trying to achieve multi tenant for whole (LGTM) as per dynamic header value?
how to can we check if header values are set? ( i'm using logging exporter with verbosity: detailed ) but it is not showing any header level values.
let me know, if you need more info.
thanks.
Collector version
0.75.0
Environment information
Environment
kubernetes 1.24
otel agent and collector version: 0.75.0
OpenTelemetry Collector configuration
collector config :
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: