Files
klz-cables.com/.pnpm-store/v10/files/65/8c1a3f8dae8273970523a9222614b1c26da2c32de1d7f6a86517fc887504e5909a91ff303beb7ee7d9707fc0fe0ae7957c7595b3f0af59463baa4903888b91
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

39 lines
1.7 KiB
Plaintext

import { Span } from '@opentelemetry/api';
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
import { ExpressLayerType } from './enums/ExpressLayerType';
export type LayerPathSegment = string | RegExp | number;
export type IgnoreMatcher = string | RegExp | ((name: string) => boolean);
export type ExpressRequestInfo<T = any> = {
/** An express request object */
request: T;
route: string;
layerType: ExpressLayerType;
};
export type SpanNameHook = (info: ExpressRequestInfo,
/**
* If no decision is taken based on RequestInfo, the default name
* supplied by the instrumentation can be used instead.
*/
defaultName: string) => string;
/**
* Function that can be used to add custom attributes to the current span or the root span on
* a Express request
* @param span - The Express middleware layer span.
* @param info - An instance of ExpressRequestInfo that contains info about the request such as the route, and the layer type.
*/
export interface ExpressRequestCustomAttributeFunction {
(span: Span, info: ExpressRequestInfo): void;
}
/**
* Options available for the Express Instrumentation (see [documentation](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express#express-instrumentation-options))
*/
export interface ExpressInstrumentationConfig extends InstrumentationConfig {
/** Ignore specific based on their name */
ignoreLayers?: IgnoreMatcher[];
/** Ignore specific layers based on their type */
ignoreLayersType?: ExpressLayerType[];
spanNameHook?: SpanNameHook;
/** Function for adding custom attributes on Express request */
requestHook?: ExpressRequestCustomAttributeFunction;
}
//# sourceMappingURL=types.d.ts.map