UNPKG

@mastra/core

Version:
28 lines • 1.77 kB
import type { IMastraLogger, TraceFields } from '../_types/@internal_core@0.1.4/dist/logger/index.js'; export { isAdaptableLogger, buildLogRecordData, exportTrackedException, type AdaptableLogger, type AdapterLogSink, type LoggerAdapterContext, type LoggerAdapterOptions, type TraceFields, } from '../_types/@internal_core@0.1.4/dist/logger/index.js'; /** * Resolve OpenTelemetry-compatible correlation fields for the currently * active span (AsyncLocalStorage-backed), or undefined when no span is * active. Span/trace ids are already W3C hex format internally. * * span_id is resolved through {@link resolveExportedSpanId} rather than read * off the span directly. The active span may be internal or dropped by * `excludeSpanTypes`, in which case it never reaches an exporter and is never * stored — emitting its raw id would point the stdout line at a span that * cannot be looked up, and would disagree with the stored log record for the * same event, which carries the resolved id. * * When nothing in the chain is exportable the line keeps trace_id and omits * span_id, matching what the stored log record does for the same event: the * trace is still addressable even though no individual span is. */ export declare function resolveTraceFields(): TraceFields | undefined; /** @internal True while inside an export-suppressed log call. */ export declare function isObservabilityExportSuppressed(): boolean; /** * @internal Wrap a logger so its records are written natively (with trace * correlation) but never exported back into observability. Used when handing * the configured logger to observability internals. */ export declare function createExportSuppressedLogger(inner: IMastraLogger): IMastraLogger; //# sourceMappingURL=adapter.d.ts.map