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.
Options accepted by Observe.withSpan and SpanScope.child.
In addition to the standard OpenTelemetry SpanOptions, an explicit
parentcontext can be supplied. This is the mechanism that makes spans nest correctly acrossawaits in React Native, where the active context is tracked only synchronously (see the distributed tracing guide).