Files
klz-cables.com/.pnpm-store/v10/files/4b/d45a687f2009bfefaea4c103228b3345520172f8718c84ed28804078e6dcebaeae8bb1d7370dfe2218bfd31b2f1692f8a3ab0f9ed3cbb523b676c7bee71143
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

64 lines
2.9 KiB
Plaintext

import { ClientRequest, IncomingMessage, ServerResponse } from 'node:http';
import { Event, Integration, Span } from '@sentry/core';
import { NodeClient } from '../../sdk/client';
export interface HttpServerSpansIntegrationOptions {
/**
* Do not capture spans for incoming HTTP requests to URLs where the given callback returns `true`.
* Spans will be non recording if tracing is disabled.
*
* The `urlPath` param consists of the URL path and query string (if any) of the incoming request.
* For example: `'/users/details?id=123'`
*
* The `request` param contains the original {@type IncomingMessage} object of the incoming request.
* You can use it to filter on additional properties like method, headers, etc.
*/
ignoreIncomingRequests?: (urlPath: string, request: IncomingMessage) => boolean;
/**
* Whether to automatically ignore common static asset requests like favicon.ico, robots.txt, etc.
* This helps reduce noise in your transactions.
*
* @default `true`
*/
ignoreStaticAssets?: boolean;
/**
* Do not capture spans for incoming HTTP requests with the given status codes.
* By default, spans with some 3xx and 4xx status codes are ignored (see @default).
* Expects an array of status codes or a range of status codes, e.g. [[300,399], 404] would ignore 3xx and 404 status codes.
*
* @default `[[401, 404], [301, 303], [305, 399]]`
*/
ignoreStatusCodes?: (number | [
number,
number
])[];
/**
* @deprecated This is deprecated in favor of `incomingRequestSpanHook`.
*/
instrumentation?: {
requestHook?: (span: Span, req: ClientRequest | IncomingMessage) => void;
responseHook?: (span: Span, response: IncomingMessage | ServerResponse) => void;
applyCustomAttributesOnSpan?: (span: Span, request: ClientRequest | IncomingMessage, response: IncomingMessage | ServerResponse) => void;
};
/**
* A hook that can be used to mutate the span for incoming requests.
* This is triggered after the span is created, but before it is recorded.
*/
onSpanCreated?: (span: Span, request: IncomingMessage, response: ServerResponse) => void;
}
/**
* This integration emits spans for incoming requests handled via the node `http` module.
* It requires the `httpServerIntegration` to be present.
*/
export declare const httpServerSpansIntegration: (options?: HttpServerSpansIntegrationOptions) => Integration & {
name: "HttpServerSpans";
setup: (client: NodeClient) => void;
processEvent: (event: Event) => Event | null;
};
/**
* Check if a request is for a common static asset that should be ignored by default.
*
* Only exported for tests.
*/
export declare function isStaticAssetRequest(urlPath: string): boolean;
//# sourceMappingURL=httpServerSpansIntegration.d.ts.map