Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions example/flask-auto-instrumentation/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
uptrace==1.45.0
flask==2.3.2
itsdangerous==2.1.2
flask==3.1.3
itsdangerous==2.2.0
opentelemetry-instrumentation==0.66b0
opentelemetry-instrumentation-flask==0.66b0
opentelemetry-instrumentation-logging==0.66b0
4 changes: 3 additions & 1 deletion example/flask-gunicorn/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@

application.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///:memory:"
db = SQLAlchemy(application)
SQLAlchemyInstrumentor().instrument(engine=db.engine)
# Flask-SQLAlchemy 3.x requires an app context to access db.engine.
with application.app_context():
SQLAlchemyInstrumentor().instrument(engine=db.engine)


@application.route("/")
Expand Down
6 changes: 4 additions & 2 deletions example/flask-gunicorn/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
uptrace==1.45.0
flask==3.1.3
flask_sqlalchemy==2.5.1
itsdangerous==2.1.2
flask_sqlalchemy==3.1.1
sqlalchemy==2.0.55
itsdangerous==2.2.0
opentelemetry-instrumentation-flask==0.66b0
opentelemetry-instrumentation-sqlalchemy==0.66b0
gunicorn==23.0.0
opentelemetry-instrumentation-logging==0.66b0
4 changes: 3 additions & 1 deletion example/flask-uwsgi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

application.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///:memory:"
db = SQLAlchemy(application)
SQLAlchemyInstrumentor().instrument(engine=db.engine)
# Flask-SQLAlchemy 3.x requires an app context to access db.engine.
with application.app_context():
SQLAlchemyInstrumentor().instrument(engine=db.engine)


@application.route("/")
Expand Down
8 changes: 5 additions & 3 deletions example/flask-uwsgi/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
uptrace==1.45.0
flask==3.1.3
flask_sqlalchemy==2.5.1
itsdangerous==2.1.2
flask_sqlalchemy==3.1.1
sqlalchemy==2.0.55
itsdangerous==2.2.0
opentelemetry-instrumentation-flask==0.66b0
opentelemetry-instrumentation-sqlalchemy==0.66b0
uWSGI==2.0.22
uWSGI==2.0.31
opentelemetry-instrumentation-logging==0.66b0
4 changes: 3 additions & 1 deletion example/flask/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///:memory:"
db = SQLAlchemy(app)
SQLAlchemyInstrumentor().instrument(engine=db.engine)
# Flask-SQLAlchemy 3.x requires an app context to access db.engine.
with app.app_context():
SQLAlchemyInstrumentor().instrument(engine=db.engine)


@app.route("/")
Expand Down
6 changes: 4 additions & 2 deletions example/flask/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
uptrace==1.45.0
flask==3.1.3
flask_sqlalchemy==2.5.1
itsdangerous==2.1.2
flask_sqlalchemy==3.1.1
sqlalchemy==2.0.55
itsdangerous==2.2.0
opentelemetry-instrumentation-flask==0.66b0
opentelemetry-instrumentation-sqlalchemy==0.66b0
opentelemetry-instrumentation-logging==0.66b0
Loading