UNPKG

@aws/aws-distro-opentelemetry-node-autoinstrumentation

Version:

This package provides Amazon Web Services distribution of the OpenTelemetry Node Instrumentation, which allows for auto-instrumentation of NodeJS applications.

17 lines 1.14 kB
import { Context as OtelContext, TextMapGetter } from '@opentelemetry/api'; import { Instrumentation } from '@opentelemetry/instrumentation'; import { APIGatewayProxyEventHeaders, Context } from 'aws-lambda'; import type { AwsLambdaInstrumentation } from '@opentelemetry/instrumentation-aws-lambda'; import { LoggerProvider } from '@opentelemetry/api-logs'; export declare const traceContextEnvironmentKey = "_X_AMZN_TRACE_ID"; export declare const AWSXRAY_TRACE_ID_HEADER_CAPITALIZED = "X-Amzn-Trace-Id"; export declare const headerGetter: TextMapGetter<APIGatewayProxyEventHeaders>; export declare function applyInstrumentationPatches(instrumentations: Instrumentation[]): void; export declare const customExtractor: (event: any, _handlerContext: Context) => OtelContext; export type ExtendedAwsLambdaInstrumentation = AwsLambdaInstrumentation & { _setLoggerProvider: (loggerProvider: LoggerProvider) => void; _logForceFlusher?: () => Promise<void>; _logForceFlush: (loggerProvider: LoggerProvider) => any; }; export declare const SKIP_CREDENTIAL_CAPTURE_KEY: unique symbol; //# sourceMappingURL=instrumentation-patch.d.ts.map