feat(scope): Scoped logs and metrics capture#1861
Merged
Merged
Conversation
limbonaut
marked this pull request as ready for review
July 16, 2026 12:18
limbonaut
commented
Jul 16, 2026
|
Collaborator
Author
|
To check how it would be used, you can see my WIP implementation over here (see |
jpnurmi
reviewed
Jul 16, 2026
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 f9cb8a1. Configure here.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1861 +/- ##
==========================================
- Coverage 75.56% 75.53% -0.03%
==========================================
Files 90 90
Lines 21154 21169 +15
Branches 3759 3763 +4
==========================================
+ Hits 15986 15991 +5
- Misses 4334 4350 +16
+ Partials 834 828 -6 🚀 New features to boost your workflow:
|
jpnurmi
approved these changes
Jul 17, 2026
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.

This PR makes scope attributes a public, working part of the API. It promotes the previously-internal
sentry_scope_set_attribute/_nandsentry_scope_remove_attribute/_nto public, and addssentry_scope_capture_logandsentry_scope_capture_metricso a log or metric can be captured against a specific scope and pick up that scope's attributes and trace. Both trace and attributes now flow onto logs and metrics with spec-correct precedence, resolving most-specific-first: per-call attributes, then the passed scope, then the global scope.Needed for current scopes and performance API in the Godot SDK. See rationale in #1838.
I plan to add
sentry_scope_set_span/transactionand alsosentry_scope_clearas follow-ups.