Skip to content
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

Flask instrumentation DeprecationWarning - The '__version__' attribute is deprecated and will be removed in Flask 3.1 #2297

Closed
phillipuniverse opened this issue Feb 25, 2024 · 0 comments · Fixed by #2302
Labels
bug Something isn't working

Comments

@phillipuniverse
Copy link
Contributor

phillipuniverse commented Feb 25, 2024

Describe your environment
With the just-release opentelemetry-instrumentation-flask 0.44b0 I get this from the flask instrumentation:

DeprecationWarning: The '__version__' attribute is deprecated and will be removed in Flask 3.1. Use feature detection or 'importlib.metadata.version("flask")' instead.

Problematic code is at https://github.com/open-telemetry/opentelemetry-python-contrib/blame/8daa8ad48108775d8e799a3abc3ed06f84b4c00e/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py#L254-L263 and caused by #2013.

Flask version is 3.0.2.

Steps to reproduce
Instrument Flask > 3

What is the expected behavior?
No DeprecationWarning

What is the actual behavior?
DeprecationWarning

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant