Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
28 lines
739 B
Plaintext
28 lines
739 B
Plaintext
import { defineIntegration } from '@sentry/core';
|
|
import { generateInstrumentOnce } from '../../otel/instrument.js';
|
|
import { SentryNodeFetchInstrumentation } from './SentryNodeFetchInstrumentation.js';
|
|
|
|
const INTEGRATION_NAME = 'NodeFetch';
|
|
|
|
const instrumentSentryNodeFetch = generateInstrumentOnce(
|
|
`${INTEGRATION_NAME}.sentry`,
|
|
SentryNodeFetchInstrumentation,
|
|
(options) => {
|
|
return options;
|
|
},
|
|
);
|
|
|
|
const _nativeNodeFetchIntegration = ((options = {}) => {
|
|
return {
|
|
name: 'NodeFetch',
|
|
setupOnce() {
|
|
instrumentSentryNodeFetch(options);
|
|
},
|
|
};
|
|
}) ;
|
|
|
|
const nativeNodeFetchIntegration = defineIntegration(_nativeNodeFetchIntegration);
|
|
|
|
export { nativeNodeFetchIntegration };
|
|
//# sourceMappingURL=index.js.map
|