forked from aws-powertools/powertools-lambda-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTracerInterface.ts
25 lines (23 loc) · 1.03 KB
/
TracerInterface.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { CaptureLambdaHandlerOptions, CaptureMethodOptions, HandlerMethodDecorator, MethodDecorator } from './types';
import { Segment, Subsegment } from 'aws-xray-sdk-core';
interface TracerInterface {
addErrorAsMetadata(error: Error, remote?: boolean): void
addResponseAsMetadata(data?: unknown, methodName?: string): void
addServiceNameAnnotation(): void
annotateColdStart(): void
captureAWS<T>(aws: T): void | T
captureAWSv3Client<T>(service: T): void | T
captureAWSClient<T>(service: T): void | T
captureLambdaHandler(options?: CaptureLambdaHandlerOptions): HandlerMethodDecorator
captureMethod(options?: CaptureMethodOptions): MethodDecorator
getSegment(): Segment | Subsegment | undefined
getRootXrayTraceId(): string | undefined
isTraceSampled(): boolean
isTracingEnabled(): boolean
putAnnotation: (key: string, value: string | number | boolean) => void
putMetadata: (key: string, value: unknown, namespace?: string | undefined) => void
setSegment(segment: Segment | Subsegment): void
}
export {
TracerInterface
};