services.investigation_service module

Investigation/Triage service – collects data for /triage.

Design: - Sentry-first: search events by request_id or free-text query - Fallback: empty timeline when Sentry not configured - Grafana links: best-effort using GRAFANA_URL env - HTML rendering: minimal, self-contained and safe (escapes content)

Env: - GRAFANA_URL: base URL of Grafana, e.g. https://grafana.example.com - PUBLIC_BASE_URL/WEBAPP_URL: used for building absolute links when relevant (optional)

services.investigation_service.render_triage_html(result)[מקור]

Render a compact triage HTML report.

The HTML is intentionally simple and self-contained.

Return type:

str

פרמטרים:

result (Dict[str, Any])

async services.investigation_service.triage(query_or_request_id, limit=20)[מקור]
Return type:

Dict[str, Any]

פרמטרים:
  • query_or_request_id (str)

  • limit (int)