Handling of cross-origin request network timings #3199
Labels
bug
Something isn't working
priority:p2
Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
What happened?
Steps to Reproduce
When a cross-origin request is done (eg.
example.com
->resources.vendor.com
, but alsoexample.com
->static.example.com
or evenlocalhost:3000
(a webpack server) ->localhost:8080
(API server)), the PerformanceResourceTiming generated for these doesn't include most of the values by defaultMDN
Currently otel/sdk-trace-web
addSpanNetworkEvents
doesn't have any checks for this, which means 0 values get passed to span.addEvent, where timeorigin (time at which page loaded) gets added, causing times that look normal but are usually before span start:This sort of data isn't easy to filter out when processing is done on span level (there's no info of what is 0 value in browser), meaning simplest way to generate the request phases chart (eg. responseEnd - responseStart to calculate response duration) generating longer timings than makes sense:
Expected Behavior
Don't include values that are known to be unavailable in this case, so analysis tools could more easily handle this case differently (This might be considered a breaking change that people would be against? so I decided to first open this issue to suggest this instead of going straight to PR)
If there's too much resistance for changing current behaviour this could also be something speced out during RUM SIG and fix implemented when instrumentation follows those specs (kinda touching #3174), but as user of current instrumentation in signalfx/splunk would rather fix the current situation
The text was updated successfully, but these errors were encountered: