-
Notifications
You must be signed in to change notification settings - Fork 620
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
Include http.target in flask instrumentation metrics attributes #1457
Comments
+1 We have the same requirement but Falcon rather than Flask |
+1 We have the same requirement for both Falcon and Flask. Hi @ElementalWarrior , Good Day! I see you mentioned "Which it probably shouldn't until there is a solution to set the value to the flask url_rule instead of the raw input request". Currently we are using the latest version of contrib opentelemetry-distro==0.41b0 in which we see the traces are already having the http.route and http.target labels For Example, In traces it auto replaces like below Static Resources http.route -- /script/js/min.js to /script/path:filename http.target -- /script/js/min.js to /script/js/min.js Server Side resources http.route -/about/xyz http.target - /about/xyz. I suppose the http.route will auto truncate any query params and keep only the route. With that is it ok to add http.route to the duration attributes ? |
open-telemetry/opentelemetry-specification#2818 changed the metric attribute name from
This code: Lines 62 to 95 in b94c590
has
|
This is being worked on for Flask in #2621. Should there be other issues for other server frameworks? I'd like to fix this in as many as possible. |
Additional wrinkle to the old/new attributes question - some instrumentations such as django don't have this concept at all and simply use this: opentelemetry-python-contrib/util/opentelemetry-util-http/src/opentelemetry/util/http/__init__.py Lines 40 to 58 in b94c590
Should |
I think the transition is the best option as stated here. See #2453 |
Yup, as @emdneto has stated, we will be following the guidance of the migration plan for only popular instrumentations. For example for |
Fixed by #2621 |
As part of the semantic conventions,
http.target
should be included in the metrics attributes. However it is only present for span attributes.https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/http-metrics.md#parameterized-attributes
Currently it isn't part of the
duration_attrs
. Which it probably shouldn't until there is a solution to set the value to the flask url_rule instead of the raw input request:The text was updated successfully, but these errors were encountered: