Skip to content

ui-router-otel / DevtoolsSpanProcessor

Class: DevtoolsSpanProcessor ​

Defined in: ui-router-otel/src/processor.ts:127

A span processor that sends every span to the devtools panel's Timeline. Add it to the tracer provider the OtelPlugin's tracer comes from, so the router's own spans reach the panel too: they are how it joins a span to a transition. sink is asked for the panel on each span, so the panel may be created after the provider.

Constructors ​

Constructor ​

ts
new DevtoolsSpanProcessor(sink, __namedParameters?): DevtoolsSpanProcessor;

Defined in: ui-router-otel/src/processor.ts:132

Parameters ​

ParameterType
sink() => SpanSink | null | undefined
__namedParameters?DevtoolsSpanProcessorOptions

Returns ​

DevtoolsSpanProcessor

Methods ​

forceFlush() ​

ts
forceFlush(): Promise<void>;

Defined in: ui-router-otel/src/processor.ts:151

Resolves at once: every span is sent as it starts or ends, so none waits.

Returns ​

Promise<void>


onEnd() ​

ts
onEnd(span): void;

Defined in: ui-router-otel/src/processor.ts:146

Sends the span as ended.

Parameters ​

ParameterType
spanProcessedSpan

Returns ​

void


onStart() ​

ts
onStart(span, _parentContext?): void;

Defined in: ui-router-otel/src/processor.ts:141

Sends the span as running, unless started is false.

Parameters ​

ParameterType
spanProcessedSpan
_parentContext?Context

Returns ​

void


shutdown() ​

ts
shutdown(): Promise<void>;

Defined in: ui-router-otel/src/processor.ts:156

Stops sending; the provider calls it when it shuts down.

Returns ​

Promise<void>