Files
klz-cables.com/.pnpm-store/v10/files/95/cfe22a8306b23b52669eee5e921c2e6e7515e416f15c0f44ededb11a6fa6b0b3371a7d5f04e2d389e6cdf2eaf038a42c4deefb7558b6c097c29ae278ae3ae4
Marc Mintel 5397309103
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
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

56 lines
2.3 KiB
Plaintext

import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
import { InstrumentationBase } from '@opentelemetry/instrumentation';
export type SentryNodeFetchInstrumentationOptions = InstrumentationConfig & {
/**
* Whether breadcrumbs should be recorded for requests.
*
* @default `true`
*/
breadcrumbs?: boolean;
/**
* Do not capture breadcrumbs or inject headers for outgoing fetch requests to URLs where the given callback returns `true`.
* The same option can be passed to the top-level httpIntegration where it controls both, breadcrumb and
* span creation.
*
* @param url Contains the entire URL, including query string (if any), protocol, host, etc. of the outgoing request.
*/
ignoreOutgoingRequests?: (url: string) => boolean;
};
/**
* This custom node-fetch instrumentation is used to instrument outgoing fetch requests.
* It does not emit any spans.
*
* The reason this is isolated from the OpenTelemetry instrumentation is that users may overwrite this,
* which would lead to Sentry not working as expected.
*
* This is heavily inspired & adapted from:
* https://github.com/open-telemetry/opentelemetry-js-contrib/blob/28e209a9da36bc4e1f8c2b0db7360170ed46cb80/plugins/node/instrumentation-undici/src/undici.ts
*/
export declare class SentryNodeFetchInstrumentation extends InstrumentationBase<SentryNodeFetchInstrumentationOptions> {
private _channelSubs;
private _propagationDecisionMap;
private _ignoreOutgoingRequestsMap;
constructor(config?: SentryNodeFetchInstrumentationOptions);
/** No need to instrument files/modules. */
init(): void;
/** Disable the instrumentation. */
disable(): void;
/** Enable the instrumentation. */
enable(): void;
/**
* This method is called when a request is created.
* You can still mutate the request here before it is sent.
*/
private _onRequestCreated;
/**
* This method is called when a response is received.
*/
private _onResponseHeaders;
/** Subscribe to a diagnostics channel. */
private _subscribeToChannel;
/**
* Check if the given outgoing request should be ignored.
*/
private _shouldIgnoreOutgoingRequest;
}
//# sourceMappingURL=SentryNodeFetchInstrumentation.d.ts.map