Skip to content
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

Metric summaries on span #2255

Merged
merged 22 commits into from
Mar 12, 2024
Merged

Metric summaries on span #2255

merged 22 commits into from
Mar 12, 2024

Conversation

sl0thentr0py
Copy link
Member

@sl0thentr0py sl0thentr0py commented Mar 6, 2024

  • add a LocalAggregator instance on spans to duplicate metrics on the span as a gauge metric
  • proxy the main aggregator add calls to the local aggregator if a span is running
  • start a metric.timing span in the Sentry::Metrics.timing API

part of #2246

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Merging #2255 (0df891d) into master (cf8f7ae) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

❗ Current head 0df891d differs from pull request most recent head 9a7abaf. Consider uploading reports for the commit 9a7abaf to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2255      +/-   ##
==========================================
- Coverage   97.56%   97.54%   -0.03%     
==========================================
  Files         111      112       +1     
  Lines        4060     4108      +48     
==========================================
+ Hits         3961     4007      +46     
- Misses         99      101       +2     
Components Coverage Δ
sentry-ruby 98.24% <100.00%> (-0.04%) ⬇️
sentry-rails 95.05% <ø> (ø)
sentry-sidekiq 94.70% <ø> (ø)
sentry-resque 90.76% <ø> (ø)
sentry-delayed_job 95.60% <ø> (ø)
sentry-opentelemetry 100.00% <ø> (ø)
Files Coverage Δ
sentry-ruby/lib/sentry/metrics.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/metrics/aggregator.rb 99.04% <100.00%> (-0.96%) ⬇️
sentry-ruby/lib/sentry/metrics/local_aggregator.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/span.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/transaction_event.rb 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@sl0thentr0py sl0thentr0py force-pushed the neel/metrics/span-aggregator branch 6 times, most recently from b7a6537 to bf28b5c Compare March 8, 2024 13:17
@sl0thentr0py sl0thentr0py requested a review from st0012 March 8, 2024 13:29
Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

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

Looks like it does the same as Python. (Again, I am no Ruby dev so some things (in tests) look like black magic) But I guess this is ok.

* add a `LocalAggregator` instance on spans to duplicate metrics on the
  span as a gauge metric
* proxy the main aggregator add calls to the local aggregator if a span
  is running
* start a `metrics.timing` span in the `Sentry::Metrics.timing` API
Base automatically changed from neel/metrics/timing to master March 12, 2024 13:12
@sl0thentr0py sl0thentr0py merged commit b0b73fd into master Mar 12, 2024
99 of 120 checks passed
@sl0thentr0py sl0thentr0py deleted the neel/metrics/span-aggregator branch March 12, 2024 13:38
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.

None yet

2 participants