-
Notifications
You must be signed in to change notification settings - Fork 182
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
Make server.address and server.port to opt-in on HTTP server metrics #109
Conversation
Maybe it was accidental, but query is particularly prone to containing sensitive information, so it seems OK to be "just" recommended. I think that would allow instrumentations to provide an opt-out option which REQUIRED technically doesn't. |
@Oberon00 do you agree with making if so, I'd recommend we split out the other parts (that affect other signals) into separate PR(s) |
I guess the metric changes are fine, given the cardinality constraints. Making a full URL non-constructible for traces on the server-side would be big change on the other hand: unless I'm mistaken, both the old conventions and the previous ECS-based version always made that possible with just required attributes. |
d95f405
to
d27bada
Compare
I reverted all changes not related to metrics (and took the liberty to resolve corresponding threads) and will open another PR for traces (with |
Fixes #108
Most HTTP server instrumentations report
server.address
andserver.port
based on the requestHost
header as it's the only source of information they have.Depending on the reverse proxies presence and other infra configuration,
Host
header might come unmodified from clients. Malicious or buggy clients could cause a cardinality explosion and degrade the server metrics experience.The expectation is that the majority of HTTP applications do not need
server.address
andserver.port
attributes on metrics as these attributes are static and are the same for a specificservice.name
or a combination of resource attributes.They are beneficial in multi-host applications, but still, resource attributes set on the corresponding meter
and tracerproviders can be used to distinguish tenants.This PR changes
server.*
requirement level to:opt_in
for metrics, to mitigate the attack vectorrecommended
for traces. These attributes are still interesting, but not essential for the tracing experience.url.query
requirement level changed fromrecommended
torequired
(to matchurl.path
) on spans - this seems like a bug that slipped into BREAKING: Introduce commonurl.*
attributes, and improve use of namespacing underhttp.*
opentelemetry-specification#3355