-
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
headers_setter not setting header value from_context #29676
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
You are setting a span attribute based on context on the span, but you try to read this back from the context, not the span:
The context is lost because of the batch processor being present in the pipeline. Try this:
|
Thanks, this works as expected after removing batch processor.. Is there any plan that this also starts to work with batch processor as well in future? |
Hello @gunjan-chauhan-dev, there are some configuration options available in the batch processor to batch by metadata, which will allow metadata to be kept with the data. Here's the section in the README. The keys specified in |
Thanks @crobert-1, this is helpful. |
Component(s)
extension/headerssetter
What happened?
Description
I am looking to setup open telemetry collector in gateway mode, where in each tenant is responsible for sending the tenant in for in "X-Scope-Orgid" header. The setup uses headers_setter extension to populate the header value in the otlp exporter.
Steps to Reproduce
save zipkin format trace sample in traces.json
Via curl send above trace to local otel collector:
curl -X POST localhost:9411/api/v2/spans -H'Content-Type: application/json' -H 'X-Scope-Orgid: <my-tenant-id>' -d @trace.json
Expected Result
Authentication with the traces backend succeeds and traces are propagated.
Actual Result
Collector version
v0.86.0
Environment information
Environment
OS: macos 13.6.1
running docker image locally otel/opentelemetry-collector-contrib:0.86.0
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: