/**
 * Distributed Tracing Service
 *
 * Extends OpenTelemetry with Agent Anchor specific spans and context propagation.
 * Provides convenient wrappers for tracing agent operations, A2A calls, and sandbox execution.
 *
 * @packageDocumentation
 */
import { SpanKind, Span, Tracer, Context } from '@opentelemetry/api';
export declare const AnchorAttributes: {
    readonly AGENT_CAR: "anchor.agent.car";
    /** @deprecated Use AGENT_CAR instead */
    readonly AGENT_ACI: "anchor.agent.car";
    readonly AGENT_TENANT: "anchor.agent.tenant";
    readonly AGENT_TIER: "anchor.agent.tier";
    readonly AGENT_SCORE: "anchor.agent.score";
    readonly AGENT_STATE: "anchor.agent.state";
    readonly A2A_CALLER_CAR: "anchor.a2a.caller_car";
    /** @deprecated Use A2A_CALLER_CAR instead */
    readonly A2A_CALLER_ACI: "anchor.a2a.caller_car";
    readonly A2A_CALLEE_CAR: "anchor.a2a.callee_car";
    /** @deprecated Use A2A_CALLEE_CAR instead */
    readonly A2A_CALLEE_ACI: "anchor.a2a.callee_car";
    readonly A2A_ACTION: "anchor.a2a.action";
    readonly A2A_CHAIN_DEPTH: "anchor.a2a.chain_depth";
    readonly A2A_CHAIN_ID: "anchor.a2a.chain_id";
    readonly A2A_DELEGATION_USED: "anchor.a2a.delegation_used";
    readonly TRUST_SCORE: "anchor.trust.score";
    readonly TRUST_TIER: "anchor.trust.tier";
    readonly TRUST_VERIFIED: "anchor.trust.verified";
    readonly TRUST_PROOF_VALID: "anchor.trust.proof_valid";
    readonly SANDBOX_CONTAINER_ID: "anchor.sandbox.container_id";
    readonly SANDBOX_RUNTIME: "anchor.sandbox.runtime";
    readonly SANDBOX_NETWORK_LEVEL: "anchor.sandbox.network_level";
    readonly SANDBOX_FS_LEVEL: "anchor.sandbox.fs_level";
    readonly ATTESTATION_ID: "anchor.attestation.id";
    readonly ATTESTATION_TYPE: "anchor.attestation.type";
    readonly ATTESTATION_OUTCOME: "anchor.attestation.outcome";
};
/**
 * Get the Agent Anchor tracer
 */
export declare function getTracer(): Tracer;
export interface SpanOptions {
    /** Parent context (uses current context if not provided) */
    parentContext?: Context;
    /** Additional attributes */
    attributes?: Record<string, string | number | boolean>;
    /** Span kind */
    kind?: SpanKind;
}
/**
 * Create a span for agent operations
 */
export declare function startAgentSpan(operation: string, carId: string, tenantId: string, options?: SpanOptions): Span;
/**
 * Create a span for A2A calls
 */
export declare function startA2ASpan(callerCarId: string, calleeCarId: string, action: string, options?: SpanOptions): Span;
/**
 * Create a span for A2A request handling (server side)
 */
export declare function startA2AServerSpan(callerCarId: string, action: string, options?: SpanOptions): Span;
/**
 * Create a span for trust verification
 */
export declare function startTrustVerificationSpan(carId: string, options?: SpanOptions): Span;
/**
 * Create a span for sandbox execution
 */
export declare function startSandboxSpan(containerId: string, carId: string, runtime: string, options?: SpanOptions): Span;
/**
 * Create a span for attestation processing
 */
export declare function startAttestationSpan(attestationId: string, type: string, carId: string, options?: SpanOptions): Span;
/**
 * End a span with success status
 */
export declare function endSpanSuccess(span: Span): void;
/**
 * End a span with error status
 */
export declare function endSpanError(span: Span, error: Error | string): void;
/**
 * Add trust information to a span
 */
export declare function addTrustToSpan(span: Span, score: number, tier: number, verified: boolean): void;
/**
 * Add A2A chain information to a span
 */
export declare function addChainToSpan(span: Span, chainId: string, depth: number, delegationUsed: boolean): void;
/**
 * Inject trace context into headers for A2A calls
 */
export declare function injectTraceContext(headers: Record<string, string>): void;
/**
 * Extract trace context from headers for incoming A2A calls
 */
export declare function extractTraceContext(headers: Record<string, string>): Context;
/**
 * Run a function within a trace context extracted from headers
 */
export declare function withExtractedContext<T>(headers: Record<string, string>, fn: () => T): T;
/**
 * Trace an async operation
 */
export declare function traceAsync<T>(spanName: string, fn: (span: Span) => Promise<T>, options?: SpanOptions): Promise<T>;
/**
 * Trace agent registration
 */
export declare function traceAgentRegistration<T>(carId: string, tenantId: string, fn: (span: Span) => Promise<T>): Promise<T>;
/**
 * Trace A2A invocation
 */
export declare function traceA2AInvocation<T>(callerCarId: string, calleeCarId: string, action: string, fn: (span: Span) => Promise<T>): Promise<T>;
/**
 * Trace sandbox execution
 */
export declare function traceSandboxExecution<T>(containerId: string, carId: string, runtime: string, fn: (span: Span) => Promise<T>): Promise<T>;
//# sourceMappingURL=tracing.d.ts.map