Skip to content

Commit 732af4f

Browse files
committed
Better inline docs for stat name / object / suffix terminology
Signed-off-by: James Buckland <[email protected]>
1 parent b07d5c6 commit 732af4f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/envoy/stats/stats.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ namespace Stats {
2929
* maximum stat suffix length of a stat. These have defaults in StatsOptionsImpl, and the maximum
3030
* object name length can be overridden. The default initialization is used in IsolatedStatImpl, and
3131
* the user-overridden struct is stored in Options.
32+
*
33+
* As noted in the comment above StatsOptionsImpl in source/common/stats/stats_impl.h, a stat name
34+
* often contains both a string whose length is user-defined (cluster_name in the below example),
35+
* and a specific statistic name generated by Envoy, which are often as long as
36+
* `upstream_cx_connect_attempts_exceeded`. To make room for growth on both fronts, we limit the max
37+
* allowed length of each separately.
38+
*
39+
* name / stat name
40+
* |----------------------------------------------------------------|
41+
* cluster.<cluster_name>.outlier_detection.ejections_consecutive_5xx
42+
* |--------------------------------------| |-----------------------|
43+
* object name suffix
3244
*/
3345
class StatsOptions {
3446
public:

0 commit comments

Comments
 (0)