Skip to content

Commit f5c872a

Browse files
docs(baggage): Document that caller must check mutable
The `Baggage` class does not enforce mutability. Document this to avoid confusion.
1 parent 8c25c73 commit f5c872a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sentry_sdk/tracing_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,10 @@ def __repr__(self):
459459
class Baggage:
460460
"""
461461
The W3C Baggage header information (see https://www.w3.org/TR/baggage/).
462+
463+
Before mutating a `Baggage` object, calling code must check that `mutable` is `True`.
464+
Mutating a `Baggage` object that has `mutable` set to `False` is not allowed, but
465+
it is the caller's responsibility to enforce this restriction.
462466
"""
463467

464468
__slots__ = ("sentry_items", "third_party_items", "mutable")

0 commit comments

Comments
 (0)