Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meshreg: add metrics #461

Merged
merged 1 commit into from
Dec 5, 2023
Merged

Conversation

believening
Copy link
Contributor

添加 meshreg 指标:

  • slime_meshregistry_enabled_source: 当前启用的注册中心总数
  • slime_meshregistry_mcp_push_count:当前实例向 istiod 推送的次数
  • slime_meshregistry_ready_time:启用的注册中心 source 达到就绪状态的耗时
  • slime_meshregistry_polling_time:轮训模式从注册中心完成一次全量服务数据同步的耗时分布,分注册中心
  • slime_meshregistry_polling_count:轮训模式向注册中心执行的全量服务数据同步的次数,分注册中心
  • slime_meshregistry_service_entry_{creation,deletion,update}:执行 se 创建、删除、更新的次数,分注册中心
  • slime_meshregistry_service_entry_total:当前内存中保存的 se 的总数
  • slime_meshregistry_sidecar_{creation,deletion,update}:执行 sidecar 创建、删除、更新的次数,分注册中心
  • slime_meshregistry_sidecar_total:当前内存中保存的 sidecar 的总数
  • slime_meshregistry_source_event_count:注册中心 source 产生的配置变更事件的次数,分注册中心、配置类型、事件类型
  • slime_meshregistry_source_client_request_count:向注册中心发起的请求的次数,分注册中心

@believening
Copy link
Contributor Author

example:

# HELP slime_framework_submodules_count total number of submodules
# TYPE slime_framework_submodules_count gauge
slime_framework_submodules_count 1
# HELP slime_meshregistry_enabled_source Number of enabled sources.
# TYPE slime_meshregistry_enabled_source gauge
slime_meshregistry_enabled_source 3
# HELP slime_meshregistry_mcp_push_count Number of mcp push.
# TYPE slime_meshregistry_mcp_push_count counter
slime_meshregistry_mcp_push_count 1
# HELP slime_meshregistry_polling_time Time spent on polling in seconds
# TYPE slime_meshregistry_polling_time histogram
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="0.5"} 54
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="1"} 54
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="3"} 54
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="5"} 54
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="8"} 54
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="10"} 54
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="20"} 54
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="30"} 54
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="60"} 54
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="90"} 54
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="120"} 54
slime_meshregistry_polling_time_bucket{source="eureka",status="true",le="+Inf"} 54
slime_meshregistry_polling_time_sum{source="eureka",status="true"} 0.4265233670000001
slime_meshregistry_polling_time_count{source="eureka",status="true"} 54
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="0.5"} 27
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="1"} 27
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="3"} 27
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="5"} 27
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="8"} 27
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="10"} 27
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="20"} 27
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="30"} 27
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="60"} 27
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="90"} 27
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="120"} 27
slime_meshregistry_polling_time_bucket{source="nacos",status="true",le="+Inf"} 27
slime_meshregistry_polling_time_sum{source="nacos",status="true"} 2.307905504
slime_meshregistry_polling_time_count{source="nacos",status="true"} 27
# HELP slime_meshregistry_pollings_count Number of pollings by source.
# TYPE slime_meshregistry_pollings_count counter
slime_meshregistry_pollings_count{source="eureka",status="true"} 54
slime_meshregistry_pollings_count{source="nacos",status="true"} 27
# HELP slime_meshregistry_ready_time_seconds Time spent on ready in seconds
# TYPE slime_meshregistry_ready_time_seconds gauge
slime_meshregistry_ready_time_seconds{source="eureka"} 20.022335849
slime_meshregistry_ready_time_seconds{source="nacos"} 35.110287551
slime_meshregistry_ready_time_seconds{source="sources"} 36.025003446
slime_meshregistry_ready_time_seconds{source="zookeeper"} 1.521635244
# HELP slime_meshregistry_service_entry_creation Number of service entries created by source.
# TYPE slime_meshregistry_service_entry_creation counter
slime_meshregistry_service_entry_creation{source="eureka"} 5
slime_meshregistry_service_entry_creation{source="nacos"} 11
slime_meshregistry_service_entry_creation{source="zookeeper"} 12
# HELP slime_meshregistry_service_entry_total Number of service entries in the mesh registry by source.
# TYPE slime_meshregistry_service_entry_total counter
slime_meshregistry_service_entry_total{source="eureka"} 5
slime_meshregistry_service_entry_total{source="nacos"} 11
slime_meshregistry_service_entry_total{source="zookeeper"} 12
# HELP slime_meshregistry_sidecar_creation Number of sidecars created by source.
# TYPE slime_meshregistry_sidecar_creation counter
slime_meshregistry_sidecar_creation{source="zookeeper"} 6
# HELP slime_meshregistry_sidecar_total Number of sidecars in the mesh registry by source.
# TYPE slime_meshregistry_sidecar_total gauge
slime_meshregistry_sidecar_total{source="zookeeper"} 1
# HELP slime_meshregistry_source_client_request_count client request count by source, with status.
# TYPE slime_meshregistry_source_client_request_count counter
slime_meshregistry_source_client_request_count{source="eureka",status="true"} 54
slime_meshregistry_source_client_request_count{source="nacos",status="true"} 324
slime_meshregistry_source_client_request_count{source="zookeeper",status="true"} 25
# HELP slime_meshregistry_source_event_count config event count by source, with event type and config type, and status.
# TYPE slime_meshregistry_source_event_count counter
slime_meshregistry_source_event_count{config_type="networking.istio.io/v1alpha3/ServiceEntry",event_type="Added",source="eureka",status="true"} 5
slime_meshregistry_source_event_count{config_type="networking.istio.io/v1alpha3/ServiceEntry",event_type="Added",source="nacos",status="true"} 11
slime_meshregistry_source_event_count{config_type="networking.istio.io/v1alpha3/ServiceEntry",event_type="Added",source="zookeeper",status="true"} 12
slime_meshregistry_source_event_count{config_type="networking.istio.io/v1alpha3/Sidecar",event_type="Added",source="zookeeper",status="true"} 6

@believening believening force-pushed the meshreg-metric branch 2 times, most recently from 5a3a251 to ce5a996 Compare November 30, 2023 03:42
@YonkaFang YonkaFang merged commit 933d1af into slime-io:master Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants