Compare commits

..

2 Commits

Author SHA1 Message Date
Florent Chehab 13c75697c7 (summary) add hostname to analytics properties
This helps track down what was the source of events.
This can be usefull when checking perf of different workers for instance.
2026-08-14 14:45:18 +02:00
lebaudantoine 8d000fc6d9 📈(frontend) stop double-reporting media device failures
Only report `Other` `MediaDeviceFailure` cases as they genuinely
need investigation.

Make sure we do not report the same situation both as a media event
and as a media exception when it is already handled.
2026-08-14 14:04:35 +02:00
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -12,6 +12,7 @@ and this project adheres to
- 🔥(frontend) drop unused vendored ConnectionObserver
- 🐛(frontend) vendor formatChatMessageLinks and trim surrounding newlines
- ✨(summary) add hostname to analytics properties
### Fixed
+6
View File
@@ -1,6 +1,7 @@
"""Analytics classes."""
import json
import socket
import time
from collections import Counter
from functools import lru_cache
@@ -43,6 +44,11 @@ class Analytics:
if self.is_disabled:
return
# We add hostname to help track down the source of events
properties = properties or {}
if not properties.get("hostname"):
properties = {**properties, "hostname": socket.gethostname()}
try:
self._client.capture(
event_name, distinct_id=distinct_id, properties=properties