/** * A self-owned OpenTelemetry pipeline pointed at Weave's Agents OTLP endpoint. * Spans are built through the raw OTel API rather than the Weave TS SDK's GenAI * helpers because those helpers cannot set historical timestamps, and this * collector backdates every span to when the turn actually happened. The emitter * can move onto the SDK if it gains start/end-time parameters. * * Auth headers for the Agents OTLP endpoint: * Authorization: Basic base64("api:" + WANDB_API_KEY) * project_id: / */ import type { Tracer } from '@opentelemetry/api'; import type { ResolvedConfig } from '../config.js'; /** The OTel pipeline as one unit; injected into the collector so tests can swap in an in-memory exporter. */ export interface TracerHandle { tracer: Tracer; /** Flush queued spans and tear down the exporter. Always await before exit. */ shutdown: () => Promise; } export declare function buildTracer(config: ResolvedConfig): TracerHandle;