Skip to content

Commit

Permalink
Fix class BoundedAttributes to have RLock rather than Lock
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph Heer <christoph@thelabmill.de>
  • Loading branch information
hyoinandout and jarus committed Apr 30, 2024
1 parent d285b7f commit d7ec07c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opentelemetry-api/src/opentelemetry/attributes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def __init__(
self.max_value_len = max_value_len
# OrderedDict is not used until the maxlen is reached for efficiency.
self._dict = {} # type: dict | OrderedDict
self._lock = threading.Lock() # type: threading.Lock
self._lock = threading.RLock() # type: threading.RLock
if attributes:
for key, value in attributes.items():
self[key] = value
Expand Down

0 comments on commit d7ec07c

Please sign in to comment.