getsentry / sentry-ruby

Sentry SDK for Ruby
https://sentry.io/for/ruby
MIT License
927 stars 493 forks source link

Add Metrics API and aggregator #2247

Closed sl0thentr0py closed 6 months ago

sl0thentr0py commented 7 months ago

Reference spec - https://develop.sentry.dev/sdk/metrics/

part of #2246

codecov[bot] commented 7 months ago

Codecov Report

Merging #2247 (0e87bab) into master (478c4cf) will increase coverage by 0.12%. The diff coverage is 99.50%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2247 +/- ## ========================================== + Coverage 97.41% 97.54% +0.12% ========================================== Files 102 110 +8 Lines 3828 4026 +198 ========================================== + Hits 3729 3927 +198 Misses 99 99 ``` | [Components](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | Coverage Δ | | |---|---|---| | [sentry-ruby](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `98.23% <99.50%> (+0.08%)` | :arrow_up: | | [sentry-rails](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `95.05% <ø> (ø)` | | | [sentry-sidekiq](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `94.70% <ø> (ø)` | | | [sentry-resque](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `92.30% <ø> (+1.53%)` | :arrow_up: | | [sentry-delayed_job](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `95.60% <ø> (ø)` | | | [sentry-opentelemetry](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `100.00% <ø> (ø)` | | | [Files](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | Coverage Δ | | |---|---|---| | [sentry-ruby/lib/sentry-ruby.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS1ydWJ5LnJi) | `96.56% <100.00%> (+0.12%)` | :arrow_up: | | [sentry-ruby/lib/sentry/configuration.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS9jb25maWd1cmF0aW9uLnJi) | `98.80% <100.00%> (+0.01%)` | :arrow_up: | | [sentry-ruby/lib/sentry/envelope.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS9lbnZlbG9wZS5yYg==) | `97.95% <100.00%> (ø)` | | | [sentry-ruby/lib/sentry/metrics.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS9tZXRyaWNzLnJi) | `100.00% <100.00%> (ø)` | | | [sentry-ruby/lib/sentry/metrics/configuration.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS9tZXRyaWNzL2NvbmZpZ3VyYXRpb24ucmI=) | `100.00% <100.00%> (ø)` | | | [sentry-ruby/lib/sentry/metrics/counter\_metric.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS9tZXRyaWNzL2NvdW50ZXJfbWV0cmljLnJi) | `100.00% <100.00%> (ø)` | | | [...try-ruby/lib/sentry/metrics/distribution\_metric.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS9tZXRyaWNzL2Rpc3RyaWJ1dGlvbl9tZXRyaWMucmI=) | `100.00% <100.00%> (ø)` | | | [sentry-ruby/lib/sentry/metrics/gauge\_metric.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS9tZXRyaWNzL2dhdWdlX21ldHJpYy5yYg==) | `100.00% <100.00%> (ø)` | | | [sentry-ruby/lib/sentry/metrics/metric.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS9tZXRyaWNzL21ldHJpYy5yYg==) | `100.00% <100.00%> (ø)` | | | [sentry-ruby/lib/sentry/metrics/set\_metric.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS9tZXRyaWNzL3NldF9tZXRyaWMucmI=) | `100.00% <100.00%> (ø)` | | | ... and [3 more](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2247/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry)
sl0thentr0py commented 6 months ago

will add unit lists in separate PR

sl0thentr0py commented 6 months ago

@st0012 im gonna start merging these because we want to ship this week. If you have things you want changed, feel free to leave reviews anyway, I can change them separately.