Skip to content

Commit

Permalink
chore: Add info on set local aggregator behaviour (#3276)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipphofmann authored Mar 21, 2024
1 parent 955f1ff commit 5f908cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sentry/src/main/java/io/sentry/MetricsAggregator.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ private void add(
}
totalBucketsWeight.addAndGet(addedWeight);
}

// For sets, we only record that a value has been added to the set but not which one.
// See develop docs: https://develop.sentry.dev/sdk/metrics/#sets
if (localMetricsAggregator != null) {
final double localValue = type == MetricType.Set ? addedWeight : value;
localMetricsAggregator.add(metricKey, type, key, localValue, unit, tags, timestampMs);
Expand Down

0 comments on commit 5f908cb

Please sign in to comment.