Open ev1lQuark opened 1 year ago
Here's the Metrics specification defined in Dubbo for every specific language implementation to follow.
https://cn.dubbo.apache.org/zh-cn/overview/core-features/observability/
/metrics
encapsulates basic indicator type definitions and common methods/filter/metrics
The provider’s rt metrics are exported, but there are problems with the indicator name and label formatThe implementation idea is to inject the report method of metrics into the filter chain of dubbo-go through the filter method, and realize the buried point of metrics in the dubbo-go RPC call process
dubbo_{type}_{action}_{unit}_{aggregate}
# HELP dubbo_provider_service_rt
# TYPE dubbo_provider_service_rt summary
dubbo_provider_service_rt{group="dubbo-go",method="SayHello",service="org.apache.dubbogo.samples.api.Greeter",timeout="",version="3.0.1",quantile="0.5"} 2.008e+06
dubbo_provider_service_rt{group="dubbo-go",method="SayHello",service="org.apache.dubbogo.samples.api.Greeter",timeout="",version="3.0.1",quantile="0.75"} 3.7044e+06
dubbo_provider_service_rt{group="dubbo-go",method="SayHello",service="org.apache.dubbogo.samples.api.Greeter",timeout="",version="3.0.1",quantile="0.9"} 6.2967e+06
dubbo_provider_service_rt{group="dubbo-go",method="SayHello",service="org.apache.dubbogo.samples.api.Greeter",timeout="",version="3.0.1",quantile="0.98"} 3.71908e+07
dubbo_provider_service_rt{group="dubbo-go",method="SayHello",service="org.apache.dubbogo.samples.api.Greeter",timeout="",version="3.0.1",quantile="0.99"} 3.71908e+07
dubbo_provider_service_rt{group="dubbo-go",method="SayHello",service="org.apache.dubbogo.samples.api.Greeter",timeout="",version="3.0.1",quantile="0.999"} 3.71908e+07
dubbo_provider_service_rt_sum{group="dubbo-go",method="SayHello",service="org.apache.dubbogo.samples.api.Greeter",timeout="",version="3.0.1"} 1.175357e+08
dubbo_provider_service_rt_count{group="dubbo-go",method="SayHello",service="org.apache.dubbogo.samples.api.Greeter",timeout="",version="3.0.1"} 35
# HELP dubbo_provider_rt_milliseconds_sum Sum Response Time
# TYPE dubbo_provider_rt_milliseconds_sum gauge
dubbo_provider_rt_milliseconds_sum{application_name="metrics-prometheus-provider",group="",hostname="HUAWEI-MATEBOOK14",interface="org.apache.dubbo.samples.metrics.prometheus.api.DemoService",ip="192.168.0.108",method="sayHello",version="0.0.0",} 528.0
# HELP dubbo_provider_rt_milliseconds_p99 Response Time P99
# TYPE dubbo_provider_rt_milliseconds_p99 gauge
dubbo_provider_rt_milliseconds_p99{application_name="metrics-prometheus-provider",group="",hostname="HUAWEI-MATEBOOK14",interface="org.apache.dubbo.samples.metrics.prometheus.api.DemoService",ip="192.168.0.108",method="sayHello",version="0.0.0",} 1.0
# HELP dubbo_provider_rt_milliseconds_p95 Response Time P99
# TYPE dubbo_provider_rt_milliseconds_p95 gauge
dubbo_provider_rt_milliseconds_p95{application_name="metrics-prometheus-provider",group="",hostname="HUAWEI-MATEBOOK14",interface="org.apache.dubbo.samples.metrics.prometheus.api.DemoService",ip="192.168.0.108",method="sayHello",version="0.0.0",} 1.0