-
Notifications
You must be signed in to change notification settings - Fork 153
/
Copy pathTracerInterface.ts
23 lines (21 loc) · 958 Bytes
/
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
import { CaptureLambdaHandlerOptions, CaptureMethodOptions, HandlerMethodDecorator, MethodDecorator } from './types';
import { Segment, Subsegment } from 'aws-xray-sdk-core';
interface TracerInterface {
addErrorAsMetadata(error: Error): 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
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
};