logologo
Docs
API
Docs
API
logologo
React Native Ottrelite

Classes

Class: DevSpanProcessorInterceptor
Class: OttreliteMeterProvider
Class: OttreliteTracerProvider
Class: OttreliteBackendPlatform
Class: OttreliteBackendTracy
Class: Ottrelite

Functions

Function: useTracer
Function: vanillaTracerFactory
Function: withTrace
Function: useComponentRenderTracing
Function: withComponentRenderTracing

Interfaces

Interface: OttreliteBackendInfo

Modules

Module: interop-otel/src
Module: @ottrelite/backend-platform
Module: @ottrelite/backend-wrapper-tracy
Module: @ottrelite/core

Types

Type alias: WithTraceProps
Type alias: OttreliteBackend
Type alias: StackTraceEntry
Type alias: TracingAPI
Abstract Logo

Need React or React Native expertise you can count on?

Let's talkLet's talk
Edit this page on GitHub
Previous PageReact Native Ottrelite
Next PageClass: OttreliteMeterProvider
Need help with React or React Native projects?
We support teams building scalable apps with React and React Native.
Let's talkLet's talk

#Class: DevSpanProcessorInterceptor

interop-otel/src.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

  • constructor

#Properties

  • spanToInternalTokenMapping

#Methods

  • forceFlush
  • onEnd
  • onStart
  • shutdown

#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