-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Is your feature request related to a problem? Please describe.
We would like to exclude query strings from http client and http server spans from our traces in order to avoid logging sensitive information to our tracing infrastructure.
Describe the solution you'd like
Ideally there would be some ability to configure which parts of the URL should be included in these spans, for our purposes we would just like the scheme, host and path.
Describe alternatives you've considered
We could write custom code to instrument our services or build a custom version of the instrumentation library but I think this would be a generally useful feature.
Additional context
This is the current code in HttpServerTracer for setting the url attribute:
private void setUrl(Span span, REQUEST request) {
span.setAttribute(SemanticAttributes.HTTP_URL, url(request));
}
If it is possible to access configuration here we could parse the url and scrub the sections as defined in configuration.