Skip to content

Commit 6c74bfb

Browse files
chore: Add info on set local aggregator behaviour (#2869)
Co-authored-by: Anton Pirker <[email protected]>
1 parent 0683552 commit 6c74bfb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sentry_sdk/metrics.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,8 @@ def add(
557557
# Given the new weight we consider whether we want to force flush.
558558
self._consider_force_flush()
559559

560+
# For sets, we only record that a value has been added to the set but not which one.
561+
# See develop docs: https://develop.sentry.dev/sdk/metrics/#sets
560562
if local_aggregator is not None:
561563
local_value = float(added if ty == "s" else value)
562564
local_aggregator.add(ty, key, local_value, unit, serialized_tags)

0 commit comments

Comments
 (0)