import type { ReadableSpan, Span as SdkSpan } from '@opentelemetry/sdk-trace-node';
export declare const REDACTED_EXCEPTION_MESSAGE = "exception details redacted";
/**
 * GenAI attributes that carry content. Their names are fixed by the semantic convention,
 * so they cannot carry the `lk.pii.` marker and are enumerated here instead.
 */
export declare const GEN_AI_PII_ATTRIBUTES: ReadonlySet<string>;
/**
 * Events whose body rides on a generic attribute (`content`, `tool_calls`) that cannot be
 * marked, so the whole event is dropped rather than filtered.
 */
export declare const PII_EVENT_NAMES: ReadonlySet<string>;
/**
 * Exception details are recorded by `recordException`, which resolves the project's redaction
 * setting; a third-party exporter must not see them either way.
 */
export declare const REDACTED_EXCEPTION_ATTRIBUTES: ReadonlySet<string>;
/**
 * Whether `key` names an attribute that must be stripped: it carries a dot-delimited `pii`
 * segment, or it is one of the GenAI content attributes.
 */
export declare function isPIIAttribute(key: string): boolean;
/**
 * The `LIVEKIT_TELEMETRY_ALLOW_PII` setting, or `undefined` when unset.
 *
 * For integrators who let the framework adopt the ambient OpenTelemetry provider (a
 * NodeSDK-style setup) and so have nowhere to pass `allowPii`. Set it to `0` to withhold
 * conversational content from third-party exporters.
 */
/**
 * Whether the record's own stamp says the project mandated redaction.
 *
 * Attribute-only on purpose: the modules that need this sit at the top of the telemetry
 * barrel, which job.ts imports, so they cannot reach the ambient job context. The stamp is
 * applied to every record by the metadata processor.
 */
export declare function redactionEnabledFromAttributes(attributes: Record<string, unknown> | undefined): boolean;
export declare function allowPiiFromEnv(): boolean | undefined;
/** Keeps the pre-filter payload for {@link restorePii} to hand LiveKit Cloud. */
export declare function stashPii(span: SdkSpan): void;
/**
 * The span as it was before PII was stripped for third-party exporters.
 *
 * Only LiveKit Cloud's own exporter calls this; every other destination sees the redacted
 * span. Returns `span` unchanged when nothing was stashed.
 *
 * The view delegates to the span through its prototype so the getters `ReadableSpan` relies
 * on keep working, with only `attributes` and `events` shadowed.
 */
export declare function restorePii(span: ReadableSpan): ReadableSpan;
//# sourceMappingURL=redaction.d.ts.map