-
Notifications
You must be signed in to change notification settings - Fork 973
Replace http.url and http.target in http metric conventions #2335
Description
What are you trying to achieve?
Consistency between trace and metric attributes.
As the http metric conventions mention, http.url and http.target values cannot be the same for metrics as for traces, since these attributes are high-cardinality. So the http metric conventions say to reduce the cardinality of http.url and http.target, but still use those attribute names.
What did you expect to see?
An alternative would be to use the identifying sets of attributes from the http client and server trace conventions, with http.target replaced by http.route, and with http.route being optional since it's not always available, e.g.
For both server/client metrics, capture http.route if it's available.
And for http server metrics, at least one of the following sets of attributes is required:
http.scheme,http.hosthttp.scheme,http.server_name,net.host.porthttp.scheme,net.host.name,net.host.port
And for http client metrics, at least one of the following sets of attributes is required:
http.scheme,http.hosthttp.scheme,net.peer.name,net.peer.porthttp.scheme,net.peer.ip,net.peer.port