From b7f8e76b7a45f23d21b003c0196182b8f9b2d113 Mon Sep 17 00:00:00 2001 From: Barry Daniels Date: Thu, 19 Sep 2024 16:08:24 +0200 Subject: [PATCH] fixed psycopg2 instrumentor --- src/dso_api/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dso_api/settings.py b/src/dso_api/settings.py index 27ebed846..a773efecd 100644 --- a/src/dso_api/settings.py +++ b/src/dso_api/settings.py @@ -314,7 +314,7 @@ from azure.monitor.opentelemetry import configure_azure_monitor from opentelemetry.instrumentation.django import DjangoInstrumentor - from opentelemetry.instrumentation.psycopg import PsycopgInstrumentor + from opentelemetry.instrumentation.psycopg2 import Psycopg2Instrumentor from opentelemetry.sdk.resources import Resource from opentelemetry.semconv.resource import ResourceAttributes @@ -353,7 +353,7 @@ def response_hook(span, request, response): DjangoInstrumentor().instrument(response_hook=response_hook) print("django instrumentor enabled") - PsycopgInstrumentor().instrument(enable_commenter=True, commenter_options={}) + Psycopg2Instrumentor().instrument(enable_commenter=True, commenter_options={}) print("psycopg instrumentor enabled") # -- Third party app settings