enableOpenTelemetry MethodStatic
Enable logging to OpenTelemetry. withSpan will be enabled, all log entries will be attached to active span as span events.
IModelHost.startup will call this automatically if the enableOpenTelemetry
option is enabled and it succeeds in requiring @opentelemetry/api
.
enableOpenTelemetry(tracer: Tracer, api: { context: Pick<ContextAPI, "active" | "with">, trace: Pick<TraceAPI, "setSpan" | "setSpanContext" | "getSpan"> }): void
@note Node.js OpenTelemetry SDK should be initialized by the user.
Parameter | Type | Description |
---|---|---|
tracer | Tracer | |
api | { context: Pick<ContextAPI, "active" | "with">, trace: Pick<TraceAPI, "setSpan" | "setSpanContext" | "getSpan"> } |
Returns - void
Defined in
- core/bentley/src/Tracing.ts Line 143
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.