@launchdarkly/observability-react-native
    Preparing search index...

    Type Alias WithSpanOptions

    WithSpanOptions: SpanOptions & { parent?: Context }

    Options accepted by Observe.withSpan and SpanScope.child.

    In addition to the standard OpenTelemetry SpanOptions, an explicit parent context can be supplied. This is the mechanism that makes spans nest correctly across awaits in React Native, where the active context is tracked only synchronously (see the distributed tracing guide).

    Type declaration

    • Optionalparent?: Context

      The context to parent the new span under. When omitted the currently active context is used. SpanScope.child sets this automatically to the parent scope's context, so children nest correctly even after an await.