constructor()Constructor to create a Trace instance.
constructor(options?: TraceOptions)| Property | Type | Description | Default Value |
|---|---|---|---|
tracerName | string | Trace identifier | nocobase-trace |
version | string | Current version of NocoBase | |
processorName | string | string[] | Identifier(s) of registered SpanProcessor to use | - |
init()Initializes NodeTracerProvider.
init(): voidregisterProcessor()Registers a SpanProcessor.
registerProcessor(name: string, processor: GetSpanProcessor)| Parameter | Type | Description |
|---|---|---|
name | string | Unique identifier for SpanProcessor |
processor | () => SpanProcessor | Function to get SpanProcessor |
getTracer()Gets the Tracer.
getTracer(name?: string, version?: string)| Parameter | Type | Description | Default Value |
|---|---|---|---|
name | string | Trace identifier | nocobase-trace |
version | string | Current version of NocoBase |
start()Starts the SpanProcessor.
start(): voidshutdown()Stops the SpanProcessor.
shutdown(): Promise<void>