Skip to content

Commit

Permalink
OpenTelemetry: fix service name in Azure Insights
Browse files Browse the repository at this point in the history
  • Loading branch information
vdboor committed Nov 4, 2024
1 parent b348c95 commit c6c6ea8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dso_api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c6c6ea8

Please sign in to comment.