/**
 * # `intake/otel-spans` — OTel `TraceSpanEvent[]` → `RunRecord[]`.
 *
 * Turns an existing observability stream into the substrate-canonical
 * `RunRecord` shape so consumers with logs but no eval discipline can
 * call `analyzeRuns()` against their production traffic immediately.
 *
 * Pivot rule: spans are grouped by `tangle.runId` (the same attribute the
 * hosted-tier wire format uses) or, when absent, by `traceId`. One group
 * becomes one `RunRecord`. The root span (no `parentSpanId`) supplies:
 *
 *   - `runId` (the group key)
 *   - `wallMs` from `endTimeUnixNano - startTimeUnixNano`
 *   - `model` from `gen_ai.request.model` / `llm.model` / `tangle.model`
 *   - cost from `cost.usd` / `gen_ai.usage.cost_usd` / `tangle.cost.usd`
 *   - token usage from `gen_ai.usage.{input,output}_tokens`
 *   - `outcome.searchScore` from `tangle.score` / `eval.score` when
 *     present; `outcome.raw` collects every numeric attribute.
 *
 * Spans that ERRORed (`status.code === 'ERROR'`) populate `failureMode`
 * with their `name` so `analyzeRuns()`'s failure clustering sees them.
 */
import type { TraceSpanEvent } from '../../hosted/types';
import type { RunRecord, RunSplitTag } from '../../run-record';
export interface FromOtelSpansOptions {
    spans: TraceSpanEvent[];
    /** Default split tag for synthesized records. Defaults to `'holdout'`. */
    defaultSplit?: RunSplitTag;
    /** Default `experimentId` when not present on any span. */
    experimentId?: string;
}
export declare function fromOtelSpans(opts: FromOtelSpansOptions): RunRecord[];
//# sourceMappingURL=otel-spans.d.ts.map