Skip to content

Commit bacea4c

Browse files
committed
Disable unneeded opentelemetry instrumentations since psycopg2 has an error anyway
1 parent 281c8f5 commit bacea4c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/backend/app.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,13 @@ def create_app():
809809

810810
if os.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING"):
811811
app.logger.info("APPLICATIONINSIGHTS_CONNECTION_STRING is set, enabling Azure Monitor")
812-
configure_azure_monitor()
812+
configure_azure_monitor(
813+
instrumentation_options={
814+
"django": {"enabled": False},
815+
"psycopg2": {"enabled": False},
816+
"fastapi": {"enabled": False},
817+
}
818+
)
813819
# This tracks HTTP requests made by aiohttp:
814820
AioHttpClientInstrumentor().instrument()
815821
# This tracks HTTP requests made by httpx:

0 commit comments

Comments
 (0)