-
Notifications
You must be signed in to change notification settings - Fork 156
/
Copy pathsegment.d.ts
62 lines (37 loc) · 1.32 KB
/
segment.d.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import Subsegment = require('./attributes/subsegment');
import IncomingRequestData = require('../middleware/incoming_request_data');
declare class Segment {
id: string;
name: string;
start_time: number;
end_time?: number;
in_progress?: boolean;
trace_id: string;
parent_id?: string;
origin?: string;
subsegments?: Array<Subsegment>;
constructor(name: string, rootId?: string | null, parentId?: string | null);
addIncomingRequestData(data: IncomingRequestData): void;
addAnnotation(key: string, value: boolean | string | number): void;
setUser(user: string): void;
addMetadata(key: string, value: any, namespace?: string): void;
setSDKData(data: object): void;
setMatchedSamplingRule(ruleName: string): void;
setServiceData(data: any): void;
addPluginData(data: object): void;
addNewSubsegment(name: string): Subsegment;
addSubsegment(subsegment: Subsegment): void;
removeSubsegment(subsegment: Subsegment): void;
addError(err: Error | string, remote?: boolean): void;
addFaultFlag(): void;
addErrorFlag(): void;
addThrottleFlag(): void;
isClosed(): boolean;
incrementCounter(additional?: number): void;
decrementCounter(): void;
close(err?: Error | string | null, remote?: boolean): void;
flush(): void;
format(): string;
toString(): string;
}
export = Segment;