withSpan MethodStatic
If OpenTelemetry tracing is enabled, creates a new span and runs the provided function in it. If OpenTelemetry tracing is not enabled, runs the provided function.
withSpan<T>(name: string, fn: () => Promise<T>, options?: SpanOptions, parentContext?: SpanContext): Promise<T>
Returns - Promise<T>
Defined in
- core/bentley/src/Tracing.ts Line 102
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.