Skip to content

Possibility to call init_app #22

@denisdubovitskiy

Description

@denisdubovitskiy

Seems like the plugin does not support deferred app initialization like other plugins do.

To avoid any cyclic imports in the app it would be great to have init_app method which takes an app as a parameter. Sometimes it's not that easy to initialize a tracer with modular layout.
The documentation has no mention about the usage with flask app factory pattern.

Example

plugins.py

tracer = FlaskTracer()

app.py

from plugins import tracer

def create_app():
    app = Flask()
    tracer.init_app(app)
    return app

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions