/redact

Redact OpenTelemetry tracing data.

Primary LanguageGoApache License 2.0Apache-2.0

Redact

Go Reference

Unfortunately, you are here. You have OpenTelemetry tracing data that shouldn't exist and you want it gone. Ideally, you are able to stop the generation of this data. But until that day arrives, redact can help!

Getting Started

Pass your needed redact option to a new OpenTelemetry TracerProvider.

Redact Attributes

Replace attributes from new spans that have keys matching "password", "user", and "secret" with a redacted value.

tracerProvider := trace.NewTracerProvider(
	redact.Attributes("password", "user", "secret"),
	/* ... */
)

Redact Spans based on name

Drop spans whose name is "really-annoying-span" or any that match "health?check*" (e.g. "health-check", "healthcheck-my-service").

tracerProvider := trace.NewTracerProvider(
	redact.Span("really-annoying-span", "health?check*"),
	/* ... */
)