From c21ad5f21c160f8597898f50248e03c6ecd8464c Mon Sep 17 00:00:00 2001 From: Michi Hoffmann Date: Tue, 11 Nov 2025 13:50:07 +0100 Subject: [PATCH 1/2] Document method to remove attributes from scopes --- develop-docs/sdk/telemetry/scopes.mdx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/develop-docs/sdk/telemetry/scopes.mdx b/develop-docs/sdk/telemetry/scopes.mdx index 043ae2c180a51..b309048e93d6c 100644 --- a/develop-docs/sdk/telemetry/scopes.mdx +++ b/develop-docs/sdk/telemetry/scopes.mdx @@ -103,6 +103,20 @@ The method SHOULD accept a dictionary/map/object where: See [Span Protocol - Common Attribute Keys](/sdk/telemetry/spans/span-protocol/#common-attribute-keys) for a list of standard attributes and [Sentry Conventions](https://github.com/getsentry/sentry-conventions/) for the complete attribute registry. +### Removing Attributes + +Users MUST be able to remove attributes set on any scope using a dedicated method (e.g., `scope.removeAttribute()` or `scope.removeAttributes()`). + +#### Example Usage + +```javascript +Sentry.getGlobalScope().removeAttribute('app.feature_flag.enabled'); +``` + +```python +sentry_sdk.get_global_scope().remove_attribute('app.feature_flag.enabled') +``` + ## Related Documents This document provides a concise summary of the [Hub & Scope Refactoring](/sdk/miscellaneous/hub_and_scope_refactoring/), focusing on implementation details and expected features. The original document remains unchanged, offering additional historical context and migration strategies. From d9b9f799833324ac5d14ec61fc4c266ab40eb8a4 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Tue, 11 Nov 2025 13:52:55 +0100 Subject: [PATCH 2/2] wip --- develop-docs/sdk/telemetry/scopes.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop-docs/sdk/telemetry/scopes.mdx b/develop-docs/sdk/telemetry/scopes.mdx index b309048e93d6c..78543defa0d34 100644 --- a/develop-docs/sdk/telemetry/scopes.mdx +++ b/develop-docs/sdk/telemetry/scopes.mdx @@ -105,7 +105,7 @@ See [Span Protocol - Common Attribute Keys](/sdk/telemetry/spans/span-protocol/# ### Removing Attributes -Users MUST be able to remove attributes set on any scope using a dedicated method (e.g., `scope.removeAttribute()` or `scope.removeAttributes()`). +Users MUST be able to remove attributes set on any scope using a dedicated method, e.g. `scope.removeAttribute()`. #### Example Usage