@redact-secret/adapter-otel
v0.1.6
Published
Deprecated name for @redact-secret/adapter-otel-trace: a compatibility re-export of the trace-only redacting OpenTelemetry JS SpanProcessor.
Readme
@redact-secret/adapter-otel
Deprecated name. This package is now
@redact-secret/adapter-otel-trace. Existing imports keep working, because this package re-exports the new one unchanged. New code should use the new name.
It only ever covered OpenTelemetry traces. It does not protect OpenTelemetry Logs, under either name.
Switch in two steps
npm uninstall @redact-secret/adapter-otel
npm install @redact-secret/adapter-otel-trace-import { createRedactingSpanProcessor } from "@redact-secret/adapter-otel";
+import { createRedactingSpanProcessor } from "@redact-secret/adapter-otel-trace";Nothing else changes. Usage stays the same:
import { NodeTracerProvider, BatchSpanProcessor } from "@opentelemetry/sdk-trace-node";
import { createRedactingSpanProcessor } from "@redact-secret/adapter-otel-trace";
const provider = new NodeTracerProvider({
spanProcessors: [await createRedactingSpanProcessor(new BatchSpanProcessor(exporter))],
});Documentation, options, outcome counters and supported versions:
@redact-secret/adapter-otel-trace.
Migrating to @redact-secret/adapter-otel-trace
The new package's 0.1.0 is the code this package shipped as 0.1.2: the same
createRedactingSpanProcessor, RedactingSpanProcessorWith,
redactAttributesWith, options, outcome shape, fail-closed markers and peer
ranges (@opentelemetry/sdk-trace-base ^2.0.0, @redact-secret/core
^0.1.0-beta.6). Swap the dependency and the import specifier as shown above.
What this package still does
Every release of this package after 0.1.2 depends on
@redact-secret/adapter-otel-trace ^0.1.0 and re-exports it:
- The same functions and the same
RedactingSpanProcessorWithclass object, soinstanceofholds across both names and a processor built through one works anywhere the other is expected. - Every export is marked
@deprecatedin its type declarations, which editors show as a strikethrough. Nothing is printed at import or call time; the package stays side-effect free. - The same peer ranges, so an install that resolved before still resolves.
test/compat-shim.test.ts checks the export list and identity against the new
package and runs a real BasicTracerProvider span through both names, reading
the OTLP JSON bytes the exporter would send. The clean-install smoke test
(npm run smoke-test) does the same from packed tarballs outside the
repository, and against the @redact-secret/adapter-otel release currently on
npm.
License
MIT
