8000 fix(batch-exports): Report Prometheus metrics in new consumer by rossgray · Pull Request #33739 · PostHog/posthog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(batch-exports): Report Prometheus metrics in new consumer #33739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rossgray
Copy link
Contributor
@rossgray rossgray commented Jun 16, 2025

Important

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Problem

We publish metrics for rows exported and bytes exported but these were missed in the new consumer implementation.

Changes

Update Prometheus counters.

Did you write or update any docs for this change?

How did you test this code?

Relying on existing tests

@rossgray rossgray requested a review from tomasfarias June 16, 2025 13:58
Copy link
Contributor
@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Added missing Prometheus metrics tracking in the new batch exports consumer implementation, specifically for monitoring rows and bytes exported during the transform_batch loop.

  • Added rows_exported_counter tracking in the SPMC consumer's transform_batch loop to count processed rows
  • Added bytes_exported_counter to measure data volume throughput during export operations
  • Implemented proper metrics handling for file metadata chunks during finalization
  • Maintained consistency with existing metrics patterns from metrics.py for monitoring batch export performance

1 file reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0