Integration · OpenTelemetry
Protect OpenTelemetry data
Use signal-specific adapters so trace and log contracts remain explicit.
01 · OpenTelemetry
Trace adapter
Wrap the next SpanProcessor. The adapter sanitizes span names, string attributes, events, links, and status messages before delegation.
npm install @redact-secret/core@0.1.0-beta.13 @redact-secret/adapter-otel-trace@0.1.3 @opentelemetry/sdk-trace-base02 · OpenTelemetry
Coverage and limits
Attribute names are not redacted. A span the wrapped processor never receives is outside the boundary. OpenTelemetry logs are a separate beta-channel package.
import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
import { createRedactingSpanProcessor } from "@redact-secret/adapter-otel-trace";
const processor = await createRedactingSpanProcessor(
new SimpleSpanProcessor(exporter),
);
// Register processor with your existing tracer provider.