@@ -32,6 +32,7 @@ or `jvm.gc.pause`. The prefix should generally have no more than 2 levels to kee
3232This is not a package hierarchy like in Java - it's simply a way to group related metrics.
3333
3434Examples of good prefixes:
35+
3536* ` ipc.* ` for inter-process communication metrics
3637* ` jvm.* ` for Java Virtual Machine metrics
3738* ` db.* ` for database metrics
@@ -79,10 +80,12 @@ and each combination consumes storage and processing resources. Tag combinations
7980over time to avoid constantly creating new time series.
8081
8182Consider the cardinality impact:
83+
8284* A metric with 3 tag keys, each with 10 possible values = 1,000 potential time series
8385* A metric with 5 tag keys, each with 10 possible values = 100,000 potential time series
8486
8587Guidelines for managing cardinality:
88+
8689* ** Limit high-cardinality dimensions.** Avoid tags with unbounded or very large value sets
8790* ** Use stable identifiers.** Tag values should remain consistent over time
8891
@@ -93,11 +96,13 @@ be queried simply and allow users to incrementally drill into the data. This imp
9396performance and user experience.
9497
9598Good query patterns:
99+
96100* ` name,threadpool.size,:eq ` - exact match on name
97101* ` name,threadpool.size,:eq,id,server-requests,:eq,:and ` - add exact tag filter
98102* ` name,threadpool.*,:re ` - simple prefix pattern (use sparingly)
99103
100104Avoid patterns that require expensive operations:
105+
101106* Complex regex patterns that must scan many metric names
102107* Queries that require examining all tag combinations to find matches
103108* Dynamic name construction that makes direct queries impossible
@@ -142,6 +147,7 @@ see the total number of threads in all pools. You can then group by or select an
142147filter the data to a subset in which you have an interest.
143148
144149This approach also supports simple queries without regex patterns:
150+
145151* ` name,threadpool.size,:eq ` gives you all thread pool sizes
146152* ` name,db.size,:eq ` gives you all database sizes
147153* ` name,threadpool.size,:eq,id,server-requests,:eq,:and ` drills down to a specific pool
0 commit comments