You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When browser navigation or resource timing apis don't set a certain timing value or report it as 0 (e.g connectionStart, responseStart,...) the spans generated by instrumentations like like xhr/fetch/resource report a value that is lower than fetchStart ( timeOrigin ) , which can result in wrong metrics by backend. Can we avoid reporting this invalid timings by either checking if their value is above 0, or above a certain reference time like fetchStart
Here is a sample payload from xhr with such issues, It is a failed xhr request and the values from domainLookupStart up to responseEnd show a lower value than fetchStart. Similar issue can happen to cached requests, or aborted requests too.
When browser navigation or resource timing apis don't set a certain timing value or report it as 0 (e.g connectionStart, responseStart,...) the spans generated by instrumentations like like xhr/fetch/resource report a value that is lower than fetchStart ( timeOrigin ) , which can result in wrong metrics by backend. Can we avoid reporting this invalid timings by either checking if their value is above 0, or above a certain reference time like fetchStart
Here is a sample payload from xhr with such issues, It is a failed xhr request and the values from domainLookupStart up to responseEnd show a lower value than fetchStart. Similar issue can happen to cached requests, or aborted requests too.
events: [
{
"attributes": [],
"name": "open",
"timeUnixNano": "1707848692048000000",
"droppedAttributesCount": 0
},
{
"attributes": [],
"name": "send",
"timeUnixNano": "1707848692048200000",
"droppedAttributesCount": 0
},
{
"attributes": [],
"name": "fetchStart",
"timeUnixNano": "1707848692048699951",
"droppedAttributesCount": 0
},
{
"attributes": [],
"name": "domainLookupStart",
"timeUnixNano": "1707848675667199951",
"droppedAttributesCount": 0
},
{
"attributes": [],
"name": "domainLookupEnd",
"timeUnixNano": "1707848675667199951",
"droppedAttributesCount": 0
},
{
"attributes": [],
"name": "connectStart",
"timeUnixNano": "1707848675667199951",
"droppedAttributesCount": 0
},
{
"attributes": [],
"name": "connectEnd",
"timeUnixNano": "1707848675667199951",
"droppedAttributesCount": 0
},
{
"attributes": [],
"name": "requestStart",
"timeUnixNano": "1707848675667199951",
"droppedAttributesCount": 0
},
{
"attributes": [],
"name": "responseStart",
"timeUnixNano": "1707848675667199951",
"droppedAttributesCount": 0
},
{
"attributes": [],
"name": "responseEnd",
"timeUnixNano": "1707848692057099951",
"droppedAttributesCount": 0
},
{
"attributes": [],
"name": "error",
"timeUnixNano": "1707848692058000000",
"droppedAttributesCount": 0
}
]
Here is how the events are added to spans,
opentelemetry-js/packages/opentelemetry-sdk-trace-web/src/utils.ts
Line 60 in 44b0b29
The text was updated successfully, but these errors were encountered: