In OpenCensus Web, we detected CORS preflight requests for XHRs by using the Resource Timing API data from the browser. When a preflight request was detected, we would create a child span for the preflight request, and attach relevant Resource Timing network event data to it (connection start, etc.)
See this OpenCensus Web readme doc about the XHR-Resource Timing join algorithm, and then perf-resource-timing-selector.ts for its code.
It would be great to have that functionality in OpenTelemetry as well. cc/ @obecny
In OpenCensus Web, we detected CORS preflight requests for XHRs by using the Resource Timing API data from the browser. When a preflight request was detected, we would create a child span for the preflight request, and attach relevant Resource Timing network event data to it (connection start, etc.)
See this OpenCensus Web readme doc about the XHR-Resource Timing join algorithm, and then perf-resource-timing-selector.ts for its code.
It would be great to have that functionality in OpenTelemetry as well. cc/ @obecny