Skip to content

Commit e1a3f19

Browse files
authored
Document method to remove attributes from scopes (#15462)
1 parent 1b09291 commit e1a3f19

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

develop-docs/sdk/telemetry/scopes.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,20 @@ The method SHOULD accept a dictionary/map/object where:
103103

104104
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.
105105

106+
### Removing Attributes
107+
108+
Users MUST be able to remove attributes set on any scope using a dedicated method, e.g. `scope.removeAttribute()`.
109+
110+
#### Example Usage
111+
112+
```javascript
113+
Sentry.getGlobalScope().removeAttribute('app.feature_flag.enabled');
114+
```
115+
116+
```python
117+
sentry_sdk.get_global_scope().remove_attribute('app.feature_flag.enabled')
118+
```
119+
106120
## Related Documents
107121

108122
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.

0 commit comments

Comments
 (0)