Skip to content

Metric summaries on span#2255

Merged
sl0thentr0py merged 22 commits intomasterfrom
neel/metrics/span-aggregator
Mar 12, 2024
Merged

Metric summaries on span#2255
sl0thentr0py merged 22 commits intomasterfrom
neel/metrics/span-aggregator

Conversation

@sl0thentr0py
Copy link
Copy Markdown
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

@sl0thentr0py sl0thentr0py mentioned this pull request Mar 6, 2024
@sl0thentr0py sl0thentr0py force-pushed the neel/metrics/span-aggregator branch from 9a6569c to 6dc3b72 Compare March 6, 2024 15:46
@codecov
Copy link
Copy Markdown

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
Copy Markdown
Contributor

@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
@sl0thentr0py sl0thentr0py force-pushed the neel/metrics/span-aggregator branch from 2a4ea74 to 116318b Compare March 12, 2024 13:04
Base automatically changed from neel/metrics/timing to master March 12, 2024 13:12
@sl0thentr0py sl0thentr0py merged commit b0b73fd into master Mar 12, 2024
@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.

2 participants