From c6c6ea87ead82f64c44cf6e656db7db75ff8c041 Mon Sep 17 00:00:00 2001 From: Diederik van der Boor Date: Tue, 29 Oct 2024 15:33:08 +0100 Subject: [PATCH] OpenTelemetry: fix service name in Azure Insights --- src/dso_api/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dso_api/settings.py b/src/dso_api/settings.py index 635141e52..eb3a782d1 100644 --- a/src/dso_api/settings.py +++ b/src/dso_api/settings.py @@ -369,7 +369,7 @@ def add_fields(self, log_record: dict, record, message_dict: dict): "urllib": {"enabled": True}, "urllib3": {"enabled": True}, }, - resource=Resource.create({ResourceAttributes.SERVICE_NAME: "haal-centraal-proxy"}), + resource=Resource.create({ResourceAttributes.SERVICE_NAME: "dso-api"}), ) print("OpenTelemetry has been enabled") @@ -410,6 +410,7 @@ def response_hook(span, request, response): for logger_name, logger_details in LOGGING["loggers"].items(): if "audit_console" in logger_details["handlers"]: LOGGING["loggers"][logger_name]["handlers"] = ["audit_console", "console"] + print("Audit logging has been enabled") # -- Third party app settings