Skip to content

Commit 2bd798a

Browse files
committed
comments
1 parent 697ed9f commit 2bd798a

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
@@ -945,6 +945,10 @@ def _sample_rand_range(parent_sampled, sample_rate):
945945

946946
def _get_value(source, key):
947947
# type: (Any, str) -> Optional[Any]
948+
"""
949+
Gets a value from a source object. The source can be a dict or an object.
950+
It is checked for dictionary keys and object attributes.
951+
"""
948952
value = None
949953
if isinstance(source, dict):
950954
value = source.get(key)

0 commit comments

Comments
 (0)