Skip to content
This repository was archived by the owner on Nov 9, 2026. It is now read-only.
This repository was archived by the owner on Nov 9, 2026. It is now read-only.

feat: Sentry Logs + client_report envelope items #361

Open

Description

@ajianaz

Summary

Accept Sentry SDK log envelope items (Sentry Logs) plus client_report items; store and search logs per project.

Why

  • Sentry SDKs (Rust 0.35+, JS, Flutter) already emit log items; TrapFall silently drops them (documented Flutter gap). Capture is nearly free: ingest, DB, retention, and search infrastructure all exist.
  • GlitchTip shipped Logs in 6.1 (Mar 2026) — table stakes for error-monitoring tools in 2026.
  • client_report closes the last unhandled native envelope type (SDK discard stats).

Design (seams)

  • Ingest: log + client_report in the item-type match; new proto type LogEvent (timestamp, level, body, attributes, trace_id?, release, environment).
  • PII scrubbing pipeline (scrub.rs) MUST run on log bodies before insert — logs are a PII leak magnet (UU PDP compliance).
  • DB: next free migration log_events (SQLite + Postgres), indexed by (project_id, timestamp).
  • Search: reuse the LIKE/trigram pattern from issue search (search.rs) — no new engine.
  • client_report: count-only into /metrics, no storage.

Acceptance criteria

  • log items parsed + scrubbed + stored; client_report counted in metrics
  • API: GET /api/0/projects/{slug}/logs (filters: level, q, time range, pagination)
  • Retention purge covers log_events
  • MCP: list_logs / search_logs tools
  • Minimal UI: logs tab in project view (list + filter)
  • Tests: parse, scrub, retention; CI green incl. web-build

Non-goals

  • Full-text search engines, log-based alert rules, cold-storage tiering (DuckDB/Parquet like GlitchTip) — revisit only if volume demands

Notes for implementer

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions