feat(occurrence): Add per-thread frame detection selection#90
Merged
Conversation
Replace the boolean active_thread_only on the frame detection options with a DetectionThread enum (ActiveThread, MainThread, AllThreads) so detectors can express thread selection explicitly. Switch the cocoa detectors to run on the main thread, resolving it via a new ProfileInterface::get_main_thread_id and falling back to the active thread when no main thread is found. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8d05a71. Configure here.
Cocoa frame detection resolves the main thread id, but SampleProfile::call_trees only built trees for the active thread. When the main thread differs from the active thread, detect_frame found no trees and detected nothing. Build trees for the main thread in addition to the active thread. Also fix clippy::unnecessary_sort_by by switching to sort_by_key. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ection DetectionThread::MainThread previously fell back to the active thread when no main thread could be resolved, causing detection to run on the wrong thread. Make MainThread strict: only run when a main thread is resolvable, otherwise produce no occurrences. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nsdeschenes
approved these changes
Jun 8, 2026
Zylphrex
added a commit
to getsentry/sentry
that referenced
this pull request
Jun 8, 2026
This includes getsentry/vroomrs#90 which ensures that cocoa issues are only detected on the main thread.
amy-chen23
pushed a commit
to getsentry/sentry
that referenced
this pull request
Jun 10, 2026
This includes getsentry/vroomrs#90 which ensures that cocoa issues are only detected on the main thread.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Replace the boolean active_thread_only on the frame detection options with a DetectionThread enum (ActiveThread, MainThread, AllThreads) so detectors can express thread selection explicitly. Switch the cocoa detectors to run on the main thread, resolving it via a new ProfileInterface::get_main_thread_id and falling back to the active thread when no main thread is found.