/**
 * OTel span helpers for evaluation telemetry.
 *
 * Creates and manages spans for benchmark execution following
 * OpenTelemetry semantic conventions for test suites and GenAI evaluation.
 *
 * Span structure:
 *   test_suite_run {benchmarkName}     ← root span (1 per benchmark run)
 *     └── test_case                    ← child span (1 per test case)
 *           └── Event: gen_ai.evaluation.result
 */
import { type Context, type Span, type Link } from '@opentelemetry/api';
import type { Benchmark, BenchmarkRun, TestCase, TestCaseRun } from '../../types/index.js';
/**
 * Start a test_suite_run root span for a benchmark run.
 *
 * Returns the span and a context carrying it for child span creation.
 * The caller MUST call finalizeTestSuiteRunSpan() when the run completes.
 */
export declare function startTestSuiteRunSpan(benchmark: Benchmark, run: BenchmarkRun): {
    span: Span;
    context: Context;
} | null;
/**
 * Start a test_case child span for a single test case evaluation.
 *
 * @param parentCtx - Context from the parent test_suite_run span
 * @param testCase - The test case being evaluated
 * @param benchmark - Parent benchmark (for name duplication)
 * @param run - Parent benchmark run (for run ID duplication)
 * @param agentRunId - Optional agent execution run ID (links eval span to agent traces)
 * @param links - Optional span links (e.g., to agent execution trace)
 */
export declare function startTestCaseSpan(parentCtx: Context, testCase: TestCase, benchmark: Benchmark, run: BenchmarkRun, agentRunId?: string, links?: Link[]): {
    span: Span;
    context: Context;
} | null;
/**
 * Add gen_ai.evaluation.result events to a test case span.
 *
 * Emits one event per metric (currently: accuracy with pass/fail label).
 */
export declare function addEvaluationResultEvents(span: Span, report: TestCaseRun): void;
/**
 * Finalize a test case span with evaluation results and end it.
 */
export declare function finalizeTestCaseSpan(span: Span, report: TestCaseRun, endTime?: Date): void;
/**
 * Finalize a test_suite_run span and end it.
 */
export declare function finalizeTestSuiteRunSpan(span: Span, run: BenchmarkRun): void;
/**
 * Emit a complete test case span for a deferred (trace-mode) evaluation.
 *
 * Used when the judge runs asynchronously after trace polling completes.
 * Creates a standalone span with explicit timestamps reflecting the original execution.
 */
export declare function emitDeferredTestCaseSpan(testCase: TestCase, report: TestCaseRun, benchmark: {
    name: string;
}, runId: string, agentRunId?: string, startTime?: Date, endTime?: Date, agentTraceId?: string): void;
//# sourceMappingURL=evalSpans.d.ts.map