import { TraceExporter } from "./types.js"; import { RedactionCounters, RedactionValidatorInstance, RedactionValidatorOptions } from "../redaction/types.js"; import { SpanAttributeValue, SpanAttributes } from "@graphorin/core"; //#region src/exporters/with-validation.d.ts /** * Options for {@link withValidation}. * * @stable */ interface WithValidationOptions extends RedactionValidatorOptions { /** * Optional pre-built validator. When supplied, the rest of the * options on this object are ignored and the supplied validator is * reused - useful for sharing one validator across multiple exporters. */ readonly validator?: RedactionValidatorInstance; } /** * Wrap an exporter so every span flows through a {@link RedactionValidator} * before reaching the sink. Exporters that are not wrapped are rejected * by the tracer at startup. * * @stable */ declare function withValidation(exporter: E, opts?: WithValidationOptions): TraceExporter; /** * Quickly check whether an exporter is the result of a previous * {@link withValidation} call. The tracer uses this to fail fast at * startup. * * @stable */ declare function isValidatedExporter(exporter: TraceExporter): boolean; /** * Pull the counters out of any exporter wrapped by {@link withValidation}. * Returns `null` for exporters that were never wrapped. * * @stable */ declare function tryGetValidatorCounters(validator: RedactionValidatorInstance): RedactionCounters; //#endregion export { WithValidationOptions, isValidatedExporter, tryGetValidatorCounters, withValidation }; //# sourceMappingURL=with-validation.d.ts.map