python-flask
python-flask copied to clipboard
Allow to have the app set late for FlaskTracing.
Addresses #22
Hey @denisdubovitskiy does this looks fine to you? Does this solve your needs? Let me know ;)
@carlosalberto seems better enough ;-). But what if you need to initialize a tracer by configuring it from the app.config (I mean host, port, service name, etc?
Init_app approach actually allows you to defer actual object creation/initialization. It means that if I call FlaskTracer() without any args and then pass an app in init_app() - the tracer will be initialized using app.conf vars during app creation, not on any other level. As an example you can see how other useful modules provide such a functionality. To get an idea, I recommend you to look into the sources of FlaskRedis or FlaskSQLAlchemy - most widely used ones
I see. I'm going to rename the name to init_app
to make it more Flask-esque.
About the configuration being taken from app.conf
I will cook later some another PR, as this would be needed on the base case as well (that is, Flask(app=app)
, and consume both the passed arguments and the ones in app.conf
, if any).
Hi there! Is there a timeline for when this will be merged into master? This functionality is definitely super handy!
@etmitchell @carlosalberto Yeah! We're also waiting for this PR to be merged!
Any changes?
Did this ever get merged? Seems like it passes checks, code is complete, etc.
This package is no longer being maintained, users should migrate to the opentelemetry-api
package.
Closing.