Owned scope telemetry

For @arki/[email protected] · source docs/upgrades/0.0.0-scope-telemetry.md

scoped, openScope, dynamicScope and createLifetime now emit one async.scope span per lifetime. The span remains open while children settle and finalizers run. An async.scope.duration histogram measures that full lifetime in milliseconds.

Configure the OpenTelemetry SDK and context manager in the application. This package imports only the API and never installs a provider. Acquisition, body, child and finalizer callbacks run in the lifetime context; custom API instrumentation and Dot's $telemetry inherit it. An async context manager is needed to retain context across await.

Attributes contain public failure code/status, counts and cancellation/deadline flags. Metrics use only an ok or failed outcome dimension. Resource values, private causes, exception stacks and abort reasons are not exported. Provider setup after module import is supported. Broken reporting or context management cannot replace application results or replay callbacks.

Public types and successful return values are unchanged. When composing Dot actions, expect the existing action span to contain a scope span. Closing a transferred handle finishes its original scope; repeated close calls do not emit another duration.

Descriptor construction has no span. Calling a descriptor's open, close, prepare or run directly remains unmanaged until an owner admits it.

The remaining typed-body limitation is unchanged: an explicitly erased unknown or void callback can hide returned failures. Preserve inference at the callback definition and validate untyped data before returning it. T08 tracks the schema/action/scope migration needed to reject such erasure without breaking generic executors.

All docs for @arki/[email protected]