/** * Utility functions for Datadog LLM Observability Exporter */ import { SpanType } from '@mastra/core/observability'; /** * Datadog LLM Observability span kinds. */ export type DatadogSpanKind = 'llm' | 'agent' | 'workflow' | 'tool' | 'task' | 'retrieval' | 'embedding'; /** * Resolves the active span-type → Datadog kind mapping based on whether the * paired @mastra/core + @mastra/observability emit MODEL_INFERENCE spans. * Re-evaluated on each call so tests can flip the feature flag at runtime. */ export declare function getSpanTypeToKind(): Partial>; /** @deprecated Prefer `getSpanTypeToKind()` so the mapping reflects the active feature flag. */ export declare const SPAN_TYPE_TO_KIND: Partial>; /** * Ensures dd-trace is initialized exactly once. * Respects any existing tracer initialization by the application. */ export declare function ensureTracer(config: { mlApp: string; site: string; apiKey?: string; agentless: boolean; service?: string; env?: string; integrationsEnabled?: boolean; }): void; /** * Returns the Datadog kind for a Mastra span type, using the mapping that * matches the active span hierarchy (legacy vs MODEL_INFERENCE). */ export declare function kindFor(spanType: SpanType): DatadogSpanKind; /** * Converts a value to a Date object. */ export declare function toDate(value: Date | string | number): Date; /** * Safely stringifies data, handling circular references. */ export declare function safeStringify(data: unknown): string; /** * Formats input data for Datadog annotations. * Model spans use message array format; others use raw or stringified data. */ export declare function formatInput(input: any, spanType: SpanType): any; /** * Formats output data for Datadog annotations. * Model spans use message array format; others use raw or stringified data. */ export declare function formatOutput(output: any, spanType: SpanType): any; //# sourceMappingURL=utils.d.ts.map