From 18d619477d1aa309b1a3c3f8147ca3bd919552d2 Mon Sep 17 00:00:00 2001 From: Trevor Blanarik Date: Sun, 17 Nov 2024 00:32:12 +0000 Subject: [PATCH] try turning on appinsights logging --- app.py | 3 +++ requirements.txt | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index dd0387b..65d94d6 100644 --- a/app.py +++ b/app.py @@ -4,7 +4,10 @@ import spotbot as sb import tables import discord_http +from azure.monitor.opentelemetry import configure_azure_monitor +from opentelemetry import trace app = Flask(__name__) +configure_azure_monitor() endpoint = os.environ.get('SECRET_ENDPOINT') @app.route(f'/{endpoint}', methods=["POST"]) diff --git a/requirements.txt b/requirements.txt index d3aa0c9..866b422 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ azure-data-tables requests pytz flask -gunicorn \ No newline at end of file +gunicorn +azure-monitor-opentelemetry \ No newline at end of file