opentelemetry-js
opentelemetry-js copied to clipboard
The batched spans are not sent during unload of browser
trafficstars
Please answer these questions before submitting a bug report.
What version of OpenTelemetry are you using?
1.0.0
What version of Node are you using?
v16.x
What did you do?
I'm creating the span to measure the time spent by an user in a page. On closing the tab/window (beforeunload event) im ending that span. I also calling the shutdown in the unload event.
What did you expect to see?
All the ended spans should be sent to the collector
What did you see instead?
The spans that are ended in before unload event are not sent.
Additional context
Im using OTLP Collector and BatchSpanProcessor to send the signals to collector.