envoyproxy/envoy

Rethink ALL_CLUSTER_STATS

Open

#7,128 建立於 2019年5月31日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)C++ (5,373 fork)batch import
help wantedtech debt

倉庫指標

Star
 (27,997 star)
PR 合併指標
 (平均合併 8天) (30 天內合併 378 個 PR)

描述

We have been dumping a bunch of things in ALL_CLUSTER_STATS that are specific certain aspects of Envoy configuration and/or extensions. Given that these stats are the largest users of memory, and there is cognitive load for having stats that are not used, we should consider breaking this apart and allowing code/extensions to create sub-scopes in the cluster for specific things.

For example:

COUNTER(lb_local_cluster_not_ok)                                                                 \
  COUNTER(lb_recalculate_zone_structures)                                                          \
  COUNTER(lb_subsets_created)                                                                      \
  COUNTER(lb_subsets_fallback)                                                                     \
  COUNTER(lb_subsets_fallback_panic)                                                               \
  COUNTER(lb_subsets_removed)                                                                      \
  COUNTER(lb_subsets_selected)                                                                     \
  COUNTER(lb_zone_cluster_too_small)                                                               \
  COUNTER(lb_zone_no_capacity_left)                                                                \
  COUNTER(lb_zone_number_differs)                                                                  \
  COUNTER(lb_zone_routing_all_directly)                                                            \
  COUNTER(lb_zone_routing_cross_zone)                                                              \
  COUNTER(lb_zone_routing_sampled)                                                                 \

All of ^ could be created on demand by extensions/LBs that use them.

cc @jmarantz

貢獻者指南