Skip to content

basalt / core/src / Tracer

Class: Tracer ​

Defined in: core/src/tracing.ts:131

Constructors ​

Constructor ​

> new Tracer(options?): Tracer

Defined in: core/src/tracing.ts:138

Parameters ​

options? ​

TracerOptions = {}

Returns ​

Tracer

Properties ​

serviceName ​

> readonly serviceName: string

Defined in: core/src/tracing.ts:132

Methods ​

forceFlush() ​

> forceFlush(): Promise<void>

Defined in: core/src/tracing.ts:180

Returns ​

Promise<void>


inSpan() ​

> inSpan<T>(span, fn): Promise<T>

Defined in: core/src/tracing.ts:169

Runs fn with span as the active span, ending it afterwards.

Type Parameters ​

T ​

T

Parameters ​

span ​

Span

fn ​

() => T | Promise<T>

Returns ​

Promise<T>


startSpan() ​

> startSpan(name, options?): Span

Defined in: core/src/tracing.ts:146

Parameters ​

name ​

string

options? ​
attributes? ​

Record<string, AttributeValue>

kind? ​

SpanKind

parent? ​

SpanContext

Returns ​

Span

Released under the MIT License.