Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How about adding some control to HttpServletRequestExtractAdapter? #29

Open
elgris opened this issue Oct 12, 2017 · 2 comments
Open

How about adding some control to HttpServletRequestExtractAdapter? #29

elgris opened this issue Oct 12, 2017 · 2 comments

Comments

@elgris
Copy link

elgris commented Oct 12, 2017

Here's the story: HttpServletRequestExtractAdapter extracts all the header values into a map. Just wondering, what would be the best way for it to skip some specific headers. For instance, I don't want to extract Authorization header (otherwise it's propagated to outgoing requests by some implementations of Tracer).

Does it make sense to add some control to HttpServletRequestExtractAdapter? Like, passing a filter function to the constructor.

@pavolloffay
Copy link
Collaborator

It is pity that you cannot register filter which would remove these headers before tracing kicks in.

What you could do is to write a custom Extractor which would filter out these values and then delegate to the actual implementation (it has to be supported by tracer implementation).

@CodingFabian
Copy link

This is about the incoming SpanContext correct?
The OT API is only:
io.opentracing.SpanContext.baggageItems()

so the problem here is that because the Filter/Extractor does not know what the vendor uses to transport them, its just providing all headers as baggage items.
This is questionable, but without having access to implementation details its not possible to do otherwise.

And currently because it happens automagically users have no way to blacklist / customize the headers.
This is what @elgris is asking for: some way to interact with the filter to limit what baggage items reach the tracer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants