-
Notifications
You must be signed in to change notification settings - Fork 790
Closed
Description
In #2624 I added the http.target
attribute to duration metrics. In #2714 by @lzchen it was accidentally removed when not opted in to the new semconv. This can be seen by adding print(point.attributes["http.target"])
here:
Lines 737 to 742 in 5a48824
if isinstance(point, HistogramDataPoint): | |
self.assertEqual(point.count, 3) | |
histrogram_data_point_seen = True | |
self.assertAlmostEqual( | |
duration, point.sum, delta=100 | |
) |
Adding SpanAttributes.HTTP_TARGET
to _server_duration_attrs_old
fixes this particular case but breaks others, e.g. http.target
starts appearing in starlette metrics with high cardinality values (i.e. the actual path, not the template).
I strongly suggest that these tests assert the actual concrete values of the metrics data as much as possible. Right now they're very lenient and tied to the implementation which allowed this regression to pass through.
Metadata
Metadata
Assignees
Labels
No labels