Replace http.url and http.target in http metric conventions #2335
Labels
area:semantic-conventions
Related to semantic conventions
semconv:HTTP
spec:metrics
Related to the specification/metrics directory
What are you trying to achieve?
Consistency between trace and metric attributes.
As the http metric conventions mention,
http.url
andhttp.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 ofhttp.url
andhttp.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 byhttp.route
, and withhttp.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.host
http.scheme
,http.server_name
,net.host.port
http.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.host
http.scheme
,net.peer.name
,net.peer.port
http.scheme
,net.peer.ip
,net.peer.port
The text was updated successfully, but these errors were encountered: