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 example doesn't work #550

Closed
AntonKueltz opened this issue Apr 3, 2020 · 0 comments · Fixed by #551
Closed

Flask instrumentation example doesn't work #550

AntonKueltz opened this issue Apr 3, 2020 · 0 comments · Fixed by #551
Labels
bug Something isn't working instrumentation Related to the instrumentation of third party libraries or frameworks

Comments

@AntonKueltz
Copy link

Describe your environment
Running on MacOS against the latest mater version of the opentelemetry-* packages.

Steps to reproduce
Instrument the app as described in the docs and docstring -

from flask import Flask
from opentelemetry.ext.flask import instrument_app
    
app = Flask(__name__)
instrument_app(app)

What is the expected behavior?
I would expect the flask app to start without any errors when running it locally.

What is the actual behavior?
I get an error running the app -

    from opentelemetry.ext.flask import instrument_app
E   ImportError: cannot import name 'instrument_app'

This is consistent with the fact that the instrument_app symbol no longer appears to be in opentelemetry.ext.flask.


The last time I ran this code was against v0.3 of the packages, so I imagine a lot has changed since then. It would be helpful to document the new correct way to instrument flask apps as it isn't currently clear to me what the correct way to do this is from looking at the docs and the code. Thanks!
@AntonKueltz AntonKueltz added the bug Something isn't working label Apr 3, 2020
ocelotl added a commit to ocelotl/opentelemetry-python that referenced this issue Apr 4, 2020
@ocelotl ocelotl added the instrumentation Related to the instrumentation of third party libraries or frameworks label Apr 6, 2020
@c24t c24t closed this as completed in #551 Apr 8, 2020
c24t pushed a commit that referenced this issue Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working instrumentation Related to the instrumentation of third party libraries or frameworks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants