open-telemetry / opentelemetry-python-contrib

OpenTelemetry instrumentation for Python modules
https://opentelemetry.io
Apache License 2.0
705 stars 589 forks source link

http.route is missing in the metrics emitted by Flask instrumentation #1963

Closed sakthiraam closed 11 months ago

sakthiraam commented 1 year ago

Describe your environment Python 3.9

Steps to reproduce Autoinstrument a Flask based app and verify the metrics such as HTTP_SERVER_DURATION. the http.uri label is missing when the data is exported but the same is available in the traces generated.

What is the expected behavior? What did you expect to see? We would like to see http.uri label as part of the metrics exposed.

What is the actual behavior? What did you see instead? We don't see this label as part of the metrics exposed.

Additional context Is this because we are using semantic convention v1.11.0 ?

from opentelemetry.metrics import get_meter from opentelemetry.semconv.metrics import MetricInstruments

https://github.com/open-telemetry/opentelemetry-python/blob/main/scripts/semconv/generate.sh

Any workaround or suggesstion to change the semconv version when we use the auto-instrumentation ?

Thank You

lzchen commented 1 year ago

I don't see http.uri as part of the specs.

sakthiraam commented 1 year ago

Hi @lzchen , Sorry, URI is the the http.route label.

sakthiraam commented 1 year ago

Hi @lzchen , Sorry to tag you. Is there an option to include the http.route label where HTTP related metrics are exposed.

sakthiraam commented 11 months ago

This issue is same as the other open issues #1457 & #1718 . Will use the other one to track the updates.