Skip to content

Commit 70f8e3d

Browse files
committed
use note flavor
1 parent f5121bd commit 70f8e3d

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

docs/metrics.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -607,23 +607,26 @@ Delta metrics reset their aggregation state after every export interval. This
607607
approach enables more efficient memory utilization by focusing only on attributes
608608
observed during each interval rather than maintaining state for all combinations.
609609

610-
* **When attributes are low-cardinality** (as in the fruit example), simply use the same
611-
calculation method as with cumulative temporality.
612-
* **When high-cardinality attribute(s) exist** like `user_id`, leverage Delta temporality's
613-
"forget state" nature to set a much lower limit based on active usage patterns.
614-
This is where Delta temporality truly excels - when the set of active values
615-
changes dynamically and only a small subset is active during any given interval.
610+
* **When attributes are low-cardinality** (as in the fruit example), use the
611+
same calculation method as with cumulative temporality.
612+
* **When high-cardinality attribute(s) exist** like `user_id`, leverage Delta
613+
temporality's "forget state" nature to set a much lower limit based on active
614+
usage patterns. This is where Delta temporality truly excels - when the set of
615+
active values changes dynamically and only a small subset is active during any
616+
given interval.
616617

617618
###### Example - High Cardinality Attribute Scenario
618619

620+
Export interval: 60 sec
621+
619622
Attributes:
620623

621624
* `user_id` (up to 1 million unique users)
622625
* `success` (true or false, 2 values)
623626

624627
Theoretical limit: 1 million users × 2 = 2 million attribute sets
625628

626-
But if only 10,000 users are typically active during a 1-minute export interval:
629+
But if only 10,000 users are typically active during a 60 sec export interval:
627630
10,000 × 2 = 20,000
628631

629632
**You can set the limit to 20,000, dramatically reducing memory usage during
@@ -633,10 +636,10 @@ normal operation.**
633636

634637
Shorter export intervals further reduce the required cardinality:
635638

636-
* If your interval is halved (e.g., from 60s to 30s), the number of unique
639+
* If your interval is halved (e.g., from 60 sec to 30 sec), the number of unique
637640
attribute sets seen per interval may also be halved.
638641

639-
But beware: more frequent exports increase CPU/network overhead due to
642+
> [!Note] More frequent exports increase CPU/network overhead due to
640643
serialization and transmission costs.
641644

642645
##### Choosing the Right Limit - Backend Considerations

0 commit comments

Comments
 (0)