Skip to content

feat(spans): Add flusher log support to GCP log analyzer tool#109080

Draft
lvthanh03 wants to merge 2 commits intomasterfrom
tony/flusher-logger-tool
Draft

feat(spans): Add flusher log support to GCP log analyzer tool#109080
lvthanh03 wants to merge 2 commits intomasterfrom
tony/flusher-logger-tool

Conversation

@lvthanh03
Copy link
Member

@lvthanh03 lvthanh03 commented Feb 23, 2026

Extend the GCP log analyzer to parse and display flusher logger output
(spans.buffer.top_flush_operations_by_bytes) in addition to the existing
buffer logger support (spans.buffer.slow_evalsha_operations).

This enables analyzing which traces are flushing the most bytes, spans, and
segments across flusher processes, helping identify traces that are most
impactful on span buffer resources.

New capabilities:

  • --log-type flusher flag to analyze flusher logs (default remains buffer)
  • --pod flag for filtering by specific k8s pod name (e.g. getsentry-consumer-process-spans-production-6cbd74fb55-cqpvc)
  • Per-phase latency breakdown in flusher summary (load_ids, load_data, decompress)
  • Flusher trace table sorted by bytes flushed with span/segment counts

New types:

  • FlusherLogAnalyzer — aggregates flusher log entries by trace, with project/trace filtering
  • FlusherTraceStats, FlusherSummaryStats — data models for flusher analysis
  • FlusherTraceData, FlusherLogEntry — parsed flusher log entry types

Example usage:

python -m sentry.spans.gcp_log_analyzer --log-type flusher --last-minutes 60

Extend the GCP log analyzer to parse and display flusher logger output
(spans.buffer.top_flush_operations_by_bytes) in addition to the existing
buffer logger support. This enables analyzing which traces are flushing
the most bytes, spans, and segments.

Changes:
- Add FlusherLogAnalyzer, FlusherTraceStats, FlusherSummaryStats
- Add FlusherTraceData, FlusherLogEntry, parse_top_flush_operations
- Add --log-type flag (buffer/flusher) to CLI
- Add --pod flag for filtering by specific k8s pod name
- Surface per-phase latency breakdown (load_ids, load_data, decompress)
  in flusher summary output

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant