MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _log_image_event

Function _log_image_event

src/utils/image_processor.py:152–162  ·  view source on GitHub ↗

Emit an IMAGE_PROCESSING analytics event, swallowing any errors. Telemetry is best-effort — a missing or misconfigured sink must never break the image pipeline.

(subtype: str, **fields: Any)

Source from the content-addressed store, hash-verified

150
151
152def _log_image_event(subtype: str, **fields: Any) -> None:
153 """Emit an IMAGE_PROCESSING analytics event, swallowing any errors.
154
155 Telemetry is best-effort — a missing or misconfigured sink must never
156 break the image pipeline.
157 """
158 try:
159 from src.services.analytics.events import EventType, log_event
160 log_event(EventType.IMAGE_PROCESSING, subtype=subtype, **fields)
161 except Exception: # pragma: no cover - telemetry is best-effort
162 pass
163
164
165def _pil_format_to_media_type(pil_format: str | None, fallback: str) -> str:

Callers 2

maybe_resize_imageFunction · 0.85

Calls 1

log_eventFunction · 0.90

Tested by

no test coverage detected