You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're writing an application and would like the ability to filter the http.url attribute that is automatically set in spans. It's possible the url can contain secrets or other information that we would like to avoid sending to third parties.
I'd be happy to spend time getting this working and open a PR if there's interest in adding this functionality to the net/http package.
Definitely open to thoughts on what the API should look like, but maybe it could be an option on the config struct?
Would this be better as a SpanProcessor on the TracerProvider? That would give it access to all spans, not just the ones created by this instrumentation. Not necessarily opposed to the idea, just wondering if there is a higher-leverage implementation point.
@Aneurysm9 That's a good question. I took a look at using SpanProcessor but couldn't see how it could be composed with the batchSpanProcessor that we're currently using.
Here is an example showing a filter setup. The BSP would be provided to the filter processor as a next step. I'm not sure it would work for this use, though, since OnEnd receives a ReadOnlySpan. It could filter out spans entirely, but not remove certain attributes without some gymnastics to reconstruct a writable span.
I'm not sure it would work for this use, though, since OnEnd receives a ReadOnlySpan. It could filter out spans entirely, but not remove certain attributes without some gymnastics to reconstruct a writable span.
Yeah, that's what I was thinking as well. I don't want to filter out the entire span, just some of the attributes.
We're writing an application and would like the ability to filter the
http.url
attribute that is automatically set in spans. It's possible the url can contain secrets or other information that we would like to avoid sending to third parties.I'd be happy to spend time getting this working and open a PR if there's interest in adding this functionality to the
net/http
package.Definitely open to thoughts on what the API should look like, but maybe it could be an option on the
config
struct?I'm imagining something roughly like:
The text was updated successfully, but these errors were encountered: