Skip to content

feat(happy-server): add Prometheus message size histograms#851

Open
EricSeastrand wants to merge 1 commit intoslopus:mainfrom
EricSeastrand:feat/prometheus-message-histograms
Open

feat(happy-server): add Prometheus message size histograms#851
EricSeastrand wants to merge 1 commit intoslopus:mainfrom
EricSeastrand:feat/prometheus-message-histograms

Conversation

@EricSeastrand
Copy link
Contributor

Summary

  • Adds two Prometheus histograms to the v3 message POST route for observability:
    • happy_message_encrypted_bytes — tracks encrypted message content size (buckets 64B–256KB)
    • happy_message_batch_count — tracks messages per batch POST (buckets 1–100)
  • Zero overhead if Prometheus isn't scraping — just in-memory counters
  • Useful baseline for anyone planning message compression or debugging payload sizes

Test plan

  • Verify server builds and starts cleanly
  • Confirm new metrics appear at /metrics endpoint after sending messages
  • Verify no performance impact on message POST route

🤖 Generated with Claude Code
via Happy

Baseline metrics for compression planning: track encrypted message
content size and batch count on the v3 message POST route.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
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