1 |
|
2 | import { IReferenceable } from 'pip-services3-commons-node';
|
3 | import { IReferences } from 'pip-services3-commons-node';
|
4 | import { ITracer } from './ITracer';
|
5 | import { TraceTiming } from './TraceTiming';
|
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 | export declare class CompositeTracer implements ITracer, IReferenceable {
|
40 | protected readonly _tracers: ITracer[];
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 | constructor(references?: IReferences);
|
47 | /**
|
48 | * Sets references to dependent components.
|
49 | *
|
50 | * @param references references to locate the component dependencies.
|
51 | */
|
52 | setReferences(references: IReferences): void;
|
53 | /**
|
54 | * Records an operation trace with its name and duration
|
55 | *
|
56 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
57 | * @param component a name of called component
|
58 | * @param operation a name of the executed operation.
|
59 | * @param duration execution duration in milliseconds.
|
60 | */
|
61 | trace(correlationId: string, component: string, operation: string, duration: number): void;
|
62 | /**
|
63 | * Records an operation failure with its name, duration and error
|
64 | *
|
65 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
66 | * @param component a name of called component
|
67 | * @param operation a name of the executed operation.
|
68 | * @param error an error object associated with this trace.
|
69 | * @param duration execution duration in milliseconds.
|
70 | */
|
71 | failure(correlationId: string, component: string, operation: string, error: Error, duration: number): void;
|
72 | /**
|
73 | * Begings recording an operation trace
|
74 | *
|
75 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
76 | * @param component a name of called component
|
77 | * @param operation a name of the executed operation.
|
78 | * @returns a trace timing object.
|
79 | */
|
80 | beginTrace(correlationId: string, component: string, operation: string): TraceTiming;
|
81 | }
|