-
Notifications
You must be signed in to change notification settings - Fork 838
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
Support filtering functions to trace/ignore http(s) requests #1436
Comments
The outgoing use-case could be solved by #1040 but with incoming it is already too late. |
Despite I am looking forward to that pull request, I think that feature does not solve this scenario. That solution allows people to completely stop tracing from that moment whereas I just want to omit a specific part and continue tracing the rest of it. For example, imagine a scenario where a web service has to make a HTTP request to a external 3rd-party (for validation, automation, whatever) that I do not want to trace (because it is defined by customer) but what happens after it is important and I have to trace it. Will I be able to do it with that? |
I don't think so. I agree that allowing to filter on anything on the http request make sense (and we should have done it from the start) |
Sounds good to me |
Some questions about it:
IMHO, a single one would be enough and |
By the way, feel free to assign me the issue 🙂 |
@sergioregueira I would be in favor of breaking the backward compatiblity by replacing On the |
Think breaking backwards compatibility is probably fine here. I agree I don't want to have too many options to maintain and the request filter would be able to completely cover the url usecase easily. |
That is right, because those parameters use |
Without knowing the way the current filter works and without reading any docs, I would assume returning true causes a request to be traced precisely because I would associate it with |
It has been a long time since latest message, but I will resume the task this week. |
This looks to be fixed by #2704, would be great if it could be published! |
I am in the middle of creating the release PR for our stable packages right now and the experimental packages (including that) will follow very soon |
@dyladan That is awesome, thanks! 🎉 |
This has been implemented since, the issue can be closed |
Is your feature request related to a problem?
Current implementation of
http
plugin allows people to filter out requests that they do not want to trace using eitherignoreIncomingPaths
orignoreOutgoingUrls
properties (see types).Nevertheless, those filters are based only on request URL; a smart filtering using either a header, param or method is not possible.
Describe the solution you'd like
Plugin should admit, as configuration parameters, two filtering functions that will decide on execution time if the incoming/outgoing request has to be traced or omitted.
Describe alternatives you've considered
The only valid solution to filter out some requests without defining the whole list of ignored URLs is to add the
x-opentelemetry-outgoing-request
header (#335) , but it was not defined to be used by applications but exporters.Additional context
The special header that I have just mentioned caused some troubles (#983) because it was not expected by 3rd-party servers. This proposal is not related to adding a new magic header but using the real data that servers already expect.
The text was updated successfully, but these errors were encountered: