/**
 * LLMObs-to-OTEL span exporter.
 *
 * Intercepts LLMObs spans at the writer level and converts them to OTEL spans
 * for export via OTEL collector. Used in CLOUD_PREM deployments where direct
 * Datadog API access is not available.
 *
 * TIERED TELEMETRY ARCHITECTURE (v0.3.0):
 *
 * This exporter emits FULL-FIDELITY spans to the OTEL Collector with the
 * `include_tier3` tier policy hint. The Collector is responsible for tier separation:
 *
 * - Tier 1: Full data (prompts, user-email, org-id) → Customer's local observability
 * - Tier 2: Sanitized data (hashed IDs, no content) → Superblocks-managed observability
 * - Tier 3: AI content with identity stripped → AI quality analysis
 *
 * The SDK's job is to:
 * 1. Convert LLMObs spans to OTEL format
 * 2. Emit ALL data (including content and identity)
 * 3. Use gen_ai.* semantic conventions ONLY (no legacy llm.* prefixes)
 * 4. Set `superblocks.tier_hint: "include_tier3"` for AI quality analysis
 *
 * The Collector's job is to:
 * 1. Hash identity attributes (user-email → user.hash) for Tier 2
 * 2. Strip forbidden attributes (llmobs.input, llmobs.output) for Tier 2
 * 3. Strip identity (no hashing) for Tier 3, but preserve content
 * 4. Route to appropriate tier pipelines based on tier_hint
 *
 * Contract: tier2-traces.v0.3.0.json
 * See also: sdk-tier-policy-hints.md
 */
/**
 * Converts LLMObs spans to OTEL spans for CLOUD_PREM deployments.
 *
 * This exporter emits FULL-FIDELITY spans. The OTEL Collector handles
 * tier separation (hashing, stripping, routing).
 *
 * When initialized, patches LLMObsSpanWriter.flush to:
 * 1. Intercept all buffered span events
 * 2. Convert each to a FULL OTEL span with gen_ai.* attributes
 * 3. Include identity and content (Collector will sanitize for Tier 2)
 * 4. Drop original spans (prevent Datadog LLMObs API submission)
 */
export declare class LLMObsOtelExporter {
    private originalFlush;
    /**
     * Get the OTEL tracer lazily to ensure it's fetched after NodeSDK is started.
     * If fetched at module load time, it can return a no-op tracer.
     */
    private get otelTracer();
    /**
     * Initialize the exporter by patching LLMObsSpanWriter.flush.
     * Safe to call multiple times - subsequent calls are no-ops.
     */
    init(): Promise<void>;
    /**
     * Emit a FULL-FIDELITY OTEL span from an LLMObs event.
     *
     * This method includes ALL data - the Collector is responsible for
     * sanitizing and routing to the appropriate tier.
     *
     * Attributes emitted (gen_ai.* only, per v0.3.0 contract):
     * - gen_ai.system (provider)
     * - gen_ai.request.model
     * - gen_ai.operation.name
     * - gen_ai.usage.* (token counts)
     * - gen_ai.request.status
     * - gen_ai.client.duration_ms
     * - gen_ai.error.category
     * - gen_ai.response.finish_reasons
     * - gen_ai.client.time_to_first_token
     *
     * Identity attributes (Collector will hash for Tier 2):
     * - user-email
     * - organization-id
     * - application-id
     * - session.id
     *
     * Content attributes (Collector will strip for Tier 2):
     * - llmobs.input
     * - llmobs.output
     */
    private emitFullFidelitySpan;
    /**
     * Map LLMObs span name to contract-defined span pattern.
     * Uses gen_ai.* naming per v0.3.0 contract.
     */
    private mapToSpanName;
    /**
     * Extract token metrics with gen_ai.usage.* naming.
     */
    private extractTokenMetrics;
    /**
     * Extract identity attributes from tags.
     * These will be hashed by the Collector for Tier 2.
     */
    private extractIdentityFromTags;
    /**
     * Normalize provider to OTEL gen_ai.system canonical names.
     */
    private normalizeSystem;
    /**
     * Extract operation name from event.
     * Maps span kind to OTEL gen_ai.operation.name values.
     */
    private extractOperationName;
    /**
     * Extract error category from event metadata.
     */
    private extractErrorCategory;
    /**
     * Extract finish reason from event.
     */
    private extractFinishReason;
    /**
     * Extract time to first token from event metadata.
     * Returns value in seconds (OTEL convention).
     */
    private extractTimeToFirstToken;
    /**
     * Safely stringify a value for span attributes.
     */
    private safeStringify;
    /**
     * Truncate an attribute value to MAX_ATTRIBUTE_LENGTH.
     * Prevents OTEL Collector rejection and memory pressure from very large values.
     */
    private truncateAttribute;
    /**
     * Validate error category is in the allowed enum.
     */
    private isValidErrorCategory;
    /**
     * Validate finish reason is in the allowed enum.
     */
    private isValidFinishReason;
    /**
     * Filter out undefined values from attributes object.
     */
    private filterUndefined;
    /**
     * Restore the original LLMObsSpanWriter.flush method.
     * Used for cleanup/testing.
     */
    restore(): void;
}
/**
 * Singleton instance of the LLMObs-to-OTEL exporter.
 * Call llmobsOtelExporter.init() in CLOUD_PREM mode to enable.
 *
 * NOTE: This exporter emits FULL-FIDELITY spans.
 * The OTEL Collector handles tier separation (hashing, stripping, routing).
 */
export declare const llmobsOtelExporter: LLMObsOtelExporter;
//# sourceMappingURL=otel-exporter.d.ts.map