Skip to content

feat(yabeda): Add sentry-yabeda adapter gem#2925

Draft
dingsdax wants to merge 4 commits intomasterfrom
feat/sentry-yabeda
Draft

feat(yabeda): Add sentry-yabeda adapter gem#2925
dingsdax wants to merge 4 commits intomasterfrom
feat/sentry-yabeda

Conversation

@dingsdax
Copy link
Copy Markdown
Contributor

@dingsdax dingsdax commented Mar 31, 2026

Sentry Ruby gem that connects Yabeda metrics to Sentry Metrics.

What it does

  • Translates Yabeda metrics into Sentry:
    • counter ➡️ Sentry.metrics.count
    • gauge ➡️ Sentry.metrics.gauge
    • histogram / summary ➡️ Sentry.metrics.distribution
  • Adds a background worker that periodically calls Yabeda.collect!
    (needed because Yabeda is pull-based, while Sentry is push-based).
  • Provides start_collector! and stop_collector! to control this worker (must run after Sentry.init).
  • Histograms and summaries are both treated as distributions.
  • The adapter is automatically registered when required.
  • Unit handling is basic for now, with plans to improve formatting later (we don't show units in Sentry yet)

Fixes RUBY-161
Fixes #2899

Introduces sentry-yabeda, a Yabeda adapter that forwards metrics to
Sentry. Covers all four Yabeda metric types (counter, gauge, histogram,
summary), a periodic collector to drive gauge collection in push-based
environments, and a full spec suite including unit and integration tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code bot commented Mar 31, 2026

Endless method syntax (def m() = val) requires Ruby 3.0+. Replace with
conventional empty method bodies (def m; end) so RuboCop using the Ruby
2.7 parser does not reject the file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@example.com>
@dingsdax dingsdax requested review from sl0thentr0py and solnic March 31, 2026 09:01
The app is configured as api_only but inherited from ActionController::Base,
which includes CSRF protection middleware. Switch to ActionController::API
to align with the api_only setting and eliminate the CSRF warning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…bled

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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.

Yabeda adapter for Sentry Metrics

2 participants