diff --git a/CHANGELOG.md b/CHANGELOG.md index 6451cefc9..a93fd776f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## Unreleased + +- Change default Stackprof profiler interval to 1000 microseconds ([#2742](https://github.com/getsentry/sentry-ruby/pull/2742)) + ## 5.28.0 ### Features @@ -7,7 +11,7 @@ ### Miscellaneous - Deprecate all Metrics related APIs [#2726](https://github.com/getsentry/sentry-ruby/pull/2726) - + Sentry [no longer has the Metrics Beta offering](https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Metrics-Beta-Ended-on-October-7th) so all the following APIs linked to Metrics have been deprecated and will be removed in the next major. diff --git a/sentry-ruby/lib/sentry/profiler.rb b/sentry-ruby/lib/sentry/profiler.rb index d1fd733f7..77ca39b8d 100644 --- a/sentry-ruby/lib/sentry/profiler.rb +++ b/sentry-ruby/lib/sentry/profiler.rb @@ -10,8 +10,8 @@ class Profiler VERSION = "1" PLATFORM = "ruby" - # 101 Hz in microseconds - DEFAULT_INTERVAL = 1e6 / 101 + # 1000 Hz in microseconds + DEFAULT_INTERVAL = 1000 MICRO_TO_NANO_SECONDS = 1e3 MIN_SAMPLES_REQUIRED = 2 diff --git a/sentry-ruby/spec/sentry/profiler_spec.rb b/sentry-ruby/spec/sentry/profiler_spec.rb index 310ae0d59..d5a548912 100644 --- a/sentry-ruby/spec/sentry/profiler_spec.rb +++ b/sentry-ruby/spec/sentry/profiler_spec.rb @@ -55,7 +55,7 @@ subject.set_initial_sample_decision(true) expect(StackProf).to receive(:start).with( - interval: 1e6 / 101, + interval: 1000, mode: :wall, raw: true, aggregate: false