Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Attributes ¶
func Attributes(keys []attribute.Key, redactFunc RedactFunc) trace.TracerProviderOption
Attributes returns an OpenTelemetry SDK TracerProviderOption. It registers an OpenTelemetry SpanProcessor that redacts attributes of new spans matching the passed keys.
Types ¶
type AttributeCensor ¶
type AttributeCensor struct {
// contains filtered or unexported fields
}
AttributeCensor is an OpenTelemetry SpanProcessor that censors attributes of new spans.
func NewAttributeCensor ¶
func NewAttributeCensor(replacements map[attribute.Key]struct{}, redactFunc RedactFunc) AttributeCensor
NewAttributeCensor returns an AttributeCensor that uses the provided mapping of replacement values for a set of keys to redact matching attributes. Attributes are matched based on the equality of keys.
func (AttributeCensor) ForceFlush ¶
func (AttributeCensor) ForceFlush(context.Context) error
ForceFlush does nothing.
func (AttributeCensor) OnEnd ¶
func (c AttributeCensor) OnEnd(s trace.ReadOnlySpan)
OnEnd censors the attributes of s matching the Replacements keys of c.
func (AttributeCensor) OnStart ¶
func (c AttributeCensor) OnStart(_ context.Context, _ trace.ReadWriteSpan)
OnStart does nothing.
type RedactFunc ¶
Click to show internal directories.
Click to hide internal directories.