-
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
Add support for Flask 3.0.0 #1975
Labels
Comments
ocelotl
changed the title
Flask 3.0.0 cannot be instrumented
Add support for Flask 3.0.0
Oct 3, 2023
Yes, we currently don't support Flask >= 3.0.0 |
Thanks @ocelotl for Label and Title fix! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe your environment
FROM python:3.11
Attempting to do
opentelemetry-bootstrap
after installing Flask 3 results in a quiet message:instrumentation for package flask<3.0,>=1.0 is available but version flask==3.0.0 is installed. Skipping.
Attempting to manually install
opentelemetry-instrumentation-flask
gives a different message:DependencyConflict: requested: "flask >= 1.0, < 3.0" but found: "flask 3.0.0"
The Flask app successfully loads and Otel API can be used to manually create spans (
tracer.start_as_current_span
). ButSERVER
spans are not created for requests accepted by the Flask app that should be intercepted by instrumentation. Here is an example 1-span trace exported to console with only theINTERNAL
type span:Steps to reproduce
I've posted a repo here with two ways to reproduce: https://github.com/tammy-baylis-swi/otel-flask-three
What is the expected behavior?
There should be no errors at bootstrap or manual install/instrument of Flask, and traces should include
SERVER
type spans when the Flask app receives a request. I think instrumentation should support Flask 3 at some point.What is the actual behavior?
There are error messages (see above) and traces do not include
SERVER
type spans when the Flask app receives a request.Additional context
I think it's from this version requirement in opentelemetry-instrumentation-flask. Upgrading to Flask 3 from the previous 2.3.3 might be breaking so some testing is needed.
The text was updated successfully, but these errors were encountered: