()
| 88 | return { |
| 89 | name: INTEGRATION_NAME, |
| 90 | setupOnce() { |
| 91 | addFetchInstrumentationHandler(handlerData => { |
| 92 | const client = getClient(); |
| 93 | const { propagateTraceparent } = client?.getOptions() || {}; |
| 94 | if (!client || !HAS_CLIENT_MAP.get(client)) { |
| 95 | return; |
| 96 | } |
| 97 | |
| 98 | if (isSentryRequestUrl(handlerData.fetchData.url, client)) { |
| 99 | return; |
| 100 | } |
| 101 | |
| 102 | instrumentFetchRequest(handlerData, _shouldCreateSpan, _shouldAttachTraceData, spans, { |
| 103 | spanOrigin: 'auto.http.fetch', |
| 104 | propagateTraceparent, |
| 105 | }); |
| 106 | |
| 107 | if (breadcrumbs) { |
| 108 | createBreadcrumb(handlerData); |
| 109 | } |
| 110 | }, true); |
| 111 | }, |
| 112 | setup(client) { |
| 113 | HAS_CLIENT_MAP.set(client, true); |
| 114 | }, |
nothing calls this directly
no test coverage detected