Class: DevSpanProcessorInterceptor

@ottrelite/interop-otel.DevSpanProcessorInterceptor

OTEL SpanProcessor implementation that intercepts spans live and passes them to Ottrelite's Development API.

This is useful for development and debugging purposes, allowing you to live-trace using compatible backends and see the events in real-time without needing to export them to a backend, nor (usually) have an infrastructure.

Example backends that are meant to be used with this processor are: @ottrelite/backend-platform, @ottrelite/backend-wrapper-tracy.

This class uses the asynchronous Ottrelite API to functionally match OTEL's async-capable tracing API.

Implements

  • SpanProcessor

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new DevSpanProcessorInterceptor()

Properties

spanToInternalTokenMapping

Protected spanToInternalTokenMapping: WeakMap<Span, number>

Maps OTEL Span objects to internal Ottrelite API tokens in the async tracing API. This is needed to match OTEL's async-aware API.

Methods

forceFlush

forceFlush(): Promise<void>

Returns

Promise<void>

Implementation of

SpanProcessor.forceFlush


onEnd

onEnd(span): void

Parameters

NameType
spanSpan

Returns

void

Implementation of

SpanProcessor.onEnd


onStart

onStart(span): void

Parameters

NameType
spanSpan

Returns

void

Implementation of

SpanProcessor.onStart


shutdown

shutdown(): Promise<void>

Returns

Promise<void>

Implementation of

SpanProcessor.shutdown

Need to boost your app's performance?
We help React Native teams enhance speed, responsiveness, and efficiency.