MCPcopy
hub / github.com/AgentOps-AI/agentops / sanitize_event

Function sanitize_event

app/api/agentops/common/sentry.py:47–56  ·  view source on GitHub ↗
(event: dict[str, Any], hint: dict[str, Any])

Source from the content-addressed store, hash-verified

45
46
47def sanitize_event(event: dict[str, Any], hint: dict[str, Any]) -> Optional[dict[str, Any]]:
48 if 'exception' not in event:
49 return event
50
51 for value in event["exception"].get("values", []):
52 frames = value.get("stacktrace", {}).get("frames", [])
53 for frame in frames:
54 if frame_vars := frame.get("vars"):
55 frame['vars'] = _sanitize_dictionaries(frame_vars)
56 return event

Calls 2

_sanitize_dictionariesFunction · 0.85
getMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…