We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09ef905 commit 11682b4Copy full SHA for 11682b4
1 file changed
src/api/common/logging/event_utils.py
@@ -10,9 +10,14 @@
10
11
12
def track_event_if_configured(event_name: str, event_data: dict):
13
+ """Track custom event to Application Insights if configured.
14
+
15
+ Args:
16
+ event_name: Name of the event to track
17
+ event_data: Dictionary of event properties
18
+ """
19
instrumentation_key = os.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING")
- print(f"Instrumentation Key: {instrumentation_key}")
20
if instrumentation_key:
21
track_event(event_name, event_data)
22
else:
- logging.warning(f"Skipping track_event for {event_name} as Application Insights is not configured")
23
+ logging.warning("Skipping track_event for %s as Application Insights is not configured", event_name)
0 commit comments