-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Collector cannot forward to another collector using the otlphttp exporter #4221
Comments
@bogdandrutu apologies for the confusion - let me clarify. We are using the Example trace protobuf we received:
Here's how "decoding it" goes:
as you can see, the trace_id and span_id arent being parsed properly from the incoming b64 encoded protobuf our server receives. here's the original payload we sent to the otel collector:
there's a base64 encoding being applied to the trace_id and span_id in the collector somewhere, either in the |
You can add a |
it's corrupted in the otlphttp exporter. |
Please post otlphttp exporter config. I don't see it in the config that is included in the issue description. |
Looking at the otlphttp exporter code I don't see how it can corrupt traceid and I am not sure how to reproduce this. |
Related to open-telemetry#4221 There was a report that TraceID and SpanID are correupted by otlphttp exporter. I added to TraceID and SpanID to try to reproduce the bug. The bug is not reproduced but keeping these in the test is useful.
I verified with a test that uses otlphttp exporter and otlp reciever: #4268 |
Related to #4221 There was a report that TraceID and SpanID are correupted by otlphttp exporter. I added to TraceID and SpanID to try to reproduce the bug. The bug is not reproduced but keeping these in the test is useful.
I think you got confused by your Python script:
As you can see (you can also check that in the generated code the traceId is |
Describe the bug
The collector is unable to forward traces to another collector using the otlphttp exporter and otlp receiver. The data exits the original collector with trace/span IDs base64 encoded instead of hex encoded, which causes the secondary receiver to 400 with an
{"code":3,"message":"invalid length for ID"}
response.Related:
#3195
open-telemetry/opentelemetry-go#1990
Steps to reproduce
Just point a collector using the otlphttp exporter at another collector, and all trace requests will fail
What did you expect to see?
I expected trace requests coming out of the otlphttp exporter to have properly formatted trace and span IDs
What did you see instead?
Trace and span IDs were base64 encoded. For example, the otlphttp exporter outputs
QwOFPwhvT4yGzxmLZVHfhA==
as the trace id when it received4303853f086f4f8c86cf198b6551df84
.What version did you use?
Version: 0.36.0
What config did you use?
Config: Here's the secondary receiver config
Environment
OS: otel/opentelemetry-collector-contrib:0.36.0
Compiler(if manually compiled): provided in docker image
Additional context
This seems to be due to an issue in the Go SDK, but the SIG meeting elected to drop JSON exporting support instead of fixing the issue. Is this fixable in the collector? If not, should the
otlphttp
exporter be removed from the collector as it exports data that isnt spec-compliant?The text was updated successfully, but these errors were encountered: