TraceProvider
此内容尚不支持你的语言。
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TraceProvider(): TraceProvider;Returns
Section titled “Returns”TraceProvider
Methods
Section titled “Methods”createSpan()
Section titled “createSpan()”createSpan<TSpanData>(spanOptions, parent?): Span<TSpanData>;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
|
|
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Span<TSpanData>
createTrace()
Section titled “createTrace()”createTrace(traceOptions): Trace;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”forceFlush()
Section titled “forceFlush()”forceFlush(): Promise<void>;Returns
Section titled “Returns”Promise<void>
getCurrentSpan()
Section titled “getCurrentSpan()”getCurrentSpan(): | Span<any> | null;Returns
Section titled “Returns”| Span<any>
| null
getCurrentTrace()
Section titled “getCurrentTrace()”getCurrentTrace(): Trace | null;Get the current trace.
Returns
Section titled “Returns”Trace | null
The current trace.
registerProcessor()
Section titled “registerProcessor()”registerProcessor(processor): void;Add a processor to the list of processors. Each processor will receive all traces/spans.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
The processor to add. |
Returns
Section titled “Returns”void
setDisabled()
Section titled “setDisabled()”setDisabled(disabled): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”void
setProcessors()
Section titled “setProcessors()”setProcessors(processors): void;Set the list of processors. This will replace any existing processors.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
The list of processors to set. |
Returns
Section titled “Returns”void
shutdown()
Section titled “shutdown()”shutdown(timeout?): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<void>
startExportLoop()
Section titled “startExportLoop()”startExportLoop(): void;Returns
Section titled “Returns”void