Traces send by http protocol fail in new Otel collector receiver
See original GitHub issueWhat version of OpenTelemetry are you using?
0.23.0
What version of Node are you using?
v14.15.2
Please provide the code you used to setup the OpenTelemetry SDK
All code is here https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web
What did you do?
I used this project example and new Otel collector (0.29.0).
What did you expect to see?
Traces OK in collector
What did you see instead?
All traces send to the Otel Collector failed (404).
Additional context
No additional.
What I think about this issue
Traces are send with beacon with a body string, so the content-type is text/plain.
New collector (0.29.0) is less permissive and expect an application/json
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Building a Trace Receiver | OpenTelemetry
In order to properly test your trace receiver, you will need a distributed tracing backend so the Collector can send the telemetry to...
Read more >OpenTelemetry troubleshooting - Logz.io Docs
This section contains some guidelines for handling errors that you may encounter when trying to collect traces with OpenTelemetry.
Read more >OpenTelemetry Collector - architecture and configuration guide
OpenTelemetry Collector is a stand-alone service provided by ... For example, you can send traces to Jaeger and metrics to Prometheus.
Read more >Troubleshoot the Collector - Splunk Documentation
The collector is improperly sized, resulting in the Splunk Distribution of OpenTelemetry Collector being unable to process and export the data as fast...
Read more >Getting Started with the AWS X-Ray Exporter in the Collector
The receiver in the OpenTelemetry Collector is responsible for receiving data ... 4 # for example configure sending traces to AWS X-Ray in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think
application/x-protobufis for GRPC protocol.application/jsonis for HTTP protocol@mogest if you use opentelemetry-collector of version 0.29.0 then, an elegant workaround to fallback to xhr without mutating the
navigator.sendBeaconproperty is to define the config of Collector Trace exporter as follows:or if you want to be explicit, update npm packages to version 0.24.0 :
note opentelemetry-collector of version 0.29.0 is released and that workaround may not be needed.