ReadonlyctxThis span's context. Pass it anywhere an explicit parent Context is required.
ReadonlyspanThe underlying OpenTelemetry span.
Run fn with this span active. Use this to parent auto-instrumented
fetch/XMLHttpRequest spans that are started after an await (the
point at which React Native loses the active context). Calls started in
the synchronous portion of a Observe.withSpan callback are already
parented automatically.
The callback to run with this span active
Start a child span parented to this scope, run fn, and end the span
automatically. The span's status is set to OK on success, or ERROR
(with the thrown error recorded) if fn throws or rejects.
Because the parent is captured from this scope rather than read from the
active context, the child nests correctly even when created after an
await.
The child span name
The callback to run within the child scope
Optionaloptions: WithSpanOptionsOptional span options
A handle to a span started with Observe.withSpan.
A scope captures its own span context, so child spans created via SpanScope.child are parented correctly even across
awaitboundaries — without manually threading context through your code.