Dashboard › getsentry › Distillation
c09cf819-c6b6-44ed-9754-e7ce6bc58c24["3e19a40f5b3a1c999b97608639631d7c","396f83983e4b2491783e965cee946159"]
Date: Aug 4, 2026
ORBITAL_UDP_SERVER is "always initialized in tests" — tests simulate the non-US path by reloading the module with the env var clearedudp_addr parsing from (host, port) string, notify_orbital handler with fall-back to user.ip_address when Kafka remote_addr missing, metrics tags getsentry.orbital.notify with outcomes ip_present/geo_miss/sent, payload includes int(time() * 1000) timestamp and platform field (e.g., "javascript"), sends via udp_socket.sendto(dumps(payload).encode("utf-8"), udp_addr), and notify_orbital is connected to a Django signal via decorator (returns Signal.connect result)from getsentry.receivers import orbital, imports MagicMock, patch from unittest.mock. Tests: (1) reload module with ORBITAL_UDP_SERVER cleared to simulate non-US path using getsentry_settings.ORBITAL_UDP_SERVER = original_server save/restore pattern, (2) asserts no_socket metric fires once at load (not per event), (3) patches getsentry.receivers.orbital.metrics.incr, orbital.geo_by_addr, orbital.udp_socket, (4) checks sock.sendto.call_count == 0 for no-socket path, (5) asserts payload fields like payload[0] == 37.7749 (lat) and payload[3] == "javascript" (platform)ORBITAL_UDP_SERVER type annotation, check how other settings handle env pattern, check BetterSignal handling of dispatch_uid with weak=False, check test setup quirks