Skip to content

Obfuscating sensitive attribute values with an Instrumentation extension #4832

Answered by trask
lalitmathwani asked this question in Q&A
Discussion options

You must be logged in to vote

hi @lalitmathwani!

you'll want to write a AutoConfigurationCustomizerProvider that registers a span exporter customizer using AutoConfigurationCustomizer.addSpanExporterCustomizer(), and your span exporter customizer can wrap the real exporter with your own SpanExporter class that delegates to the real exporter.

and then in your SpanExporter you can wrap the SpanData (since it's immutable) in your own subclass of DelegatingSpanData which does the obfuscation, and pass your subclass down to the real exporter

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@lalitmathwani
Comment options

@trask
Comment options

@lalitmathwani
Comment options

Answer selected by lalitmathwani
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants