Skip to content

Conversation

@nateberkopec
Copy link
Contributor

In using Sentry, I've found that the default profiler interval makes profiles useful only in very unusual situations. 10ms just isn't enough detail to figure out what's going on most of the time. In addition, it's so coarse-grained that it confuses newbies who don't understand how sampling profilers work and don't understand that each span may not necessarily represent 10ms of execution time.

I have not seen StackProf generate more than 1-5% overhead most of the time, and profile sample rates on every Sentry app I've worked with are < 1% of total requests. I think the better tradeoff here is in favor of more useful profiles.

10 ms is not a very useful profiler interval, so change it back to the StackProf default.
@nateberkopec
Copy link
Contributor Author

nateberkopec commented Oct 8, 2025

As far as I can tell, Vernier is running on the default interval, which is actually 500micros. I have much less experience with Vernier so I can't comment as to how much overhead that's adding, but in my conversations with John I think it's not greatly different than Stackprof.

@nateberkopec nateberkopec changed the title Change default profiler interval to 1000 microseconds Change default Stackprof profiler interval to 1000 microseconds Oct 8, 2025
@sl0thentr0py
Copy link
Member

thanks @nateberkopec, I'll have to verify with the ingestion folks if this is supported on the backend first.

As a side, the 101 is actually intentional to avoid 'lockstep sampling' as mentioned in the note here, so we'll have to do something similar for the new number too.

@sl0thentr0py sl0thentr0py self-requested a review October 9, 2025 15:02
@sl0thentr0py
Copy link
Member

sl0thentr0py commented Oct 9, 2025

Alright, this is possible, but we'll make this an optional config that still defaults to 101, I'll ship a PR later this week for that. I'll need to verify that normal payloads aren't way too oversized otherwise the event will just be dropped by the server.

@sl0thentr0py
Copy link
Member

tracking in #2744

@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.30%. Comparing base (11b8eaf) to head (f512bd9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2742      +/-   ##
==========================================
+ Coverage   97.28%   97.30%   +0.02%     
==========================================
  Files         144      144              
  Lines        5671     5682      +11     
==========================================
+ Hits         5517     5529      +12     
+ Misses        154      153       -1     
Components Coverage Δ
sentry-ruby 97.76% <100.00%> (ø)
sentry-rails 95.63% <ø> (+0.15%) ⬆️
sentry-sidekiq 96.57% <ø> (ø)
sentry-resque 94.44% <ø> (ø)
sentry-delayed_job 94.68% <ø> (ø)
sentry-opentelemetry 99.31% <ø> (ø)
Files with missing lines Coverage Δ
sentry-ruby/lib/sentry/profiler.rb 97.11% <100.00%> (ø)

... and 12 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sl0thentr0py
Copy link
Member

#2745

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