Generated API snapshot
@askrjs/otel
Exports from the declarations published in @askrjs/otel. Signatures reflect the published artifact.
Exports
This entrypoint publishes 2 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.
createTelemetrytype
createTelemetry: (options?: TelemetryOptions) => TelemetryCreates a function-first bridge to the application's installed OpenTelemetry provider. This package never installs an SDK, processor, backend, or exporter.
TelemetryOptionstype
TelemetryOptions: anyConfiguration accepted by {@link createTelemetry}.
tracerName- Name passed to `trace.getTracer`. Defaults to `"@askrjs/otel"`.
tracerVersion- Version passed to `trace.getTracer`.
logger- Sink for sanitized log lines. Defaults to a no-op.
now- Clock used for span durations. Defaults to `performance.now`.
maxFieldLength- Maximum length, in characters, retained for any string field. Defaults to 256.
sanitizeField- Per-field hook to redact or transform a field before it is logged or attached to a span; return `undefined` to drop it.
sanitizeException- Exceptions are not exported unless this hook returns a sanitized value.
onDroppedField- Optional diagnostic invoked for each non-allowlisted field; thrown and asynchronously rejected failures are isolated without awaiting diagnostics.