Skip to content

feat: New set_attribute api#2998

Merged
sl0thentr0py merged 1 commit into
masterfrom
neel/set-attribute
Jul 1, 2026
Merged

feat: New set_attribute api#2998
sl0thentr0py merged 1 commit into
masterfrom
neel/set-attribute

Conversation

@sl0thentr0py

@sl0thentr0py sl0thentr0py commented Jun 30, 2026

Copy link
Copy Markdown
Member

Implements the spec at https://develop.sentry.dev/sdk/foundations/state-management/scopes/attributes/

  • set_attribute(key, value, unit: nil)
  • set_attributes(attributes_hash)
  • remove_attribute(key)
  • attributes added to telemetry (logs and metrics for now)

Issues

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Comment thread sentry-ruby/lib/sentry/utils/telemetry_attributes.rb
Comment thread sentry-ruby/lib/sentry/scope.rb
@linear-code

linear-code Bot commented Jun 30, 2026

Copy link
Copy Markdown

RUBY-187

Comment thread sentry-ruby/lib/sentry/utils/telemetry_attributes.rb Outdated
Comment thread sentry-ruby/lib/sentry/scope.rb

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c5c0ad9. Configure here.

Comment thread sentry-ruby/lib/sentry/scope.rb Outdated
Comment thread sentry-ruby/lib/sentry/scope.rb
Comment thread sentry-ruby/lib/sentry/scope.rb
@sl0thentr0py sl0thentr0py requested review from dingsdax and solnic June 30, 2026 15:36
Comment thread sentry-ruby/lib/sentry/scope.rb Outdated

@dingsdax dingsdax left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one 👏 ; one small performance consideration

set_attribute(key, value, unit: nil)
set_attributes(attributes_hash)
remove_attribute(key)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AtcJFmXABtrEgpwngfZxq5
@sl0thentr0py sl0thentr0py merged commit 3bcfa34 into master Jul 1, 2026
173 of 177 checks passed
@sl0thentr0py sl0thentr0py deleted the neel/set-attribute branch July 1, 2026 10:19
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.

Implement Global Attributes API

2 participants