Skip to content

Commit 81bec77

Browse files
refactor: simplify logging messages in event tracking function
1 parent 9824f4e commit 81bec77

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/api/common/logging/event_utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
def track_event_if_configured(event_name: str, event_data: dict):
1515
"""Track custom event to Application Insights if configured.
1616
17-
Telemetry is strictly best-effort: any failure is logged at WARNING
18-
level and never propagated, so callers are not affected.
19-
2017
Args:
2118
event_name: Name of the event to track
2219
event_data: Dictionary of event properties
@@ -26,6 +23,6 @@ def track_event_if_configured(event_name: str, event_data: dict):
2623
try:
2724
track_event(event_name, event_data)
2825
except Exception:
29-
logger.warning("Failed to track event '%s'; telemetry is best-effort", event_name, exc_info=True)
26+
logger.warning("Failed to track event '%s'", event_name, exc_info=True)
3027
else:
3128
logger.warning("Skipping track_event for %s: Application Insights is not configured", event_name)

0 commit comments

Comments
 (0)