-
Notifications
You must be signed in to change notification settings - Fork 282
Description
Area(s)
area:http
Is your change request related to a problem? Please describe.
#675 introduced a new http attribute url.template, which is supposed to be a low-cardinality variant of url.full, however I see several open questions around the expected behavior of uri.template in regards of implementation challanges and it's relation to url.full.
From .NET's HttpClient instrumentation POV we would need to have these questions resolved and the specification adjusted before considering implementing the attribute.
Relationship with url.full
According to the uri.full spec
Sensitive content provided in
url.fullSHOULD be scrubbed when instrumentations can identify it.
In my understanding an ideal scrubbing implementation would make url.full == url.template. If this is the case, do we still need both properties? If this is not the case, how exactly do we imagine url.full to look like after scrubbing?
url.template has been introduced to have a low cardinality url attribute, but does it mean that we are ok keeping url.full high-cardinality? Moreover, if an instrumented library is unable to scrub sensitive data is it the right choice to define url.full as Required from privacy POV?
Wouldn't it be wiser to rather merge the two properites and state that if an implementation is enlightened to templatize/sanitize url.full it should be emitted in a template form?
Redirects
According to the http client span spec
Instrumentations SHOULD create an HTTP span for each attempt to send an HTTP request over the wire.
in case a user provides a url.template and a redirect happens, what value do we expect to be logged for url.template for the redirect span? If the scrubbing mechanism for url.full is based on the template, what do we expect to be logged in url.full?
Describe the solution you'd like
One possible resolution of the listed problems is to define a standard templating syntax, allowing instrumented libraries to pattern-match a list of pre-defined templates to the actual uri, and log the template in url.full if a match is found. Do not log url.full, or log a placeholder value otherwise.
Another, simpler and cheaper solution is to:
- Log the template in
url.fullfor the first request. - Do not log
url.fullfor redirects or log a placeholder value.
I don't see value keeping url.full and url.template separate with neither of my proposals. Moreover, regardless of the solution we pick, I'd recommend to make url.full Conditionally Required, allowing implementations to omit it if there is no scrubbing mechanism implemented.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status