Skip to content

Commit 5ad9df4

Browse files
committed
docstrings
1 parent a3714b0 commit 5ad9df4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sentry_sdk/scope.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,9 +1732,16 @@ def flags(self) -> "FlagBuffer":
17321732
return self._flags
17331733

17341734
def set_attribute(self, attribute: str, value: "AttributeValue") -> None:
1735+
"""
1736+
Set an attribute on the scope.
1737+
1738+
Any attributes-based telemetry (logs, metrics) captured while this scope
1739+
is active will inherit attributes set on the scope.
1740+
"""
17351741
self._attributes[attribute] = format_attribute(value)
17361742

17371743
def remove_attribute(self, attribute: str) -> None:
1744+
"""Remove an attribute if set on the scope."""
17381745
try:
17391746
del self._attributes[attribute]
17401747
except KeyError:

0 commit comments

Comments
 (0)