microsoft / ApplicationInsights-JS

Microsoft Application Insights SDK for JavaScript
MIT License
649 stars 240 forks source link

[BUG] SharedWorker does not Instrument fetch correctly #1996

Closed MSNev closed 1 year ago

MSNev commented 1 year ago

@celluj34 has identified as part of issue #1995 that for a Shared worker the InstrumentFunc for the fetch is not working due to checks around hasOwnProperty failing for globalThis.fetch and the beta usage of Object.getOwnPropertyDescriptor also fails.

We need to investigate and add an additional fallback from the _getOwner() or equivalent to use either an existence check and/or in. We also need to validate that even with these checks that we can correctly hook the relevant function and/or prototype.

This should be fixed in v2.x (if possible) and v3.x.

MSNev commented 1 year ago

Assigned to 2.8.11 so we can attempt to address in v2 which will them also get merged to v3 (beta)

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.