From c59b3ebd3ee4c1d23a14f72bec48c0b66cf0dddc Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Fri, 30 Aug 2024 14:43:13 +0800 Subject: [PATCH] use more sugar Signed-off-by: Bugen Zhao --- grafana/risingwave-dev-dashboard.dashboard.py | 2 ++ .../src/executor/monitor/streaming_stats.rs | 18 ++++-------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/grafana/risingwave-dev-dashboard.dashboard.py b/grafana/risingwave-dev-dashboard.dashboard.py index c3bf8f890f683..43ca81d4ac775 100644 --- a/grafana/risingwave-dev-dashboard.dashboard.py +++ b/grafana/risingwave-dev-dashboard.dashboard.py @@ -1122,6 +1122,8 @@ def section_streaming_cdc(outer_panels): def section_streaming_actors(outer_panels: Panels): + # The actor_id can be masked due to metrics level settings. + # We use this filter to suppress the actor-level panels if applicable. actor_level_filter = "actor_id!=''" panels = outer_panels.sub_panel() return [ diff --git a/src/stream/src/executor/monitor/streaming_stats.rs b/src/stream/src/executor/monitor/streaming_stats.rs index 8e98456fc0a82..97a747c281bfd 100644 --- a/src/stream/src/executor/monitor/streaming_stats.rs +++ b/src/stream/src/executor/monitor/streaming_stats.rs @@ -397,13 +397,8 @@ impl StreamingMetrics { &["actor_id", "fragment_id", "upstream_fragment_id"], registry ) - .unwrap(); - let actor_in_record_cnt = RelabeledGuardedIntCounterVec::with_metric_level_relabel_n( - MetricLevel::Debug, - actor_in_record_cnt, - level, - 1, - ); + .unwrap() + .relabel_debug_1(level); let actor_out_record_cnt = register_guarded_int_counter_vec_with_registry!( "stream_actor_out_record_cnt", @@ -411,13 +406,8 @@ impl StreamingMetrics { &["actor_id", "fragment_id"], registry ) - .unwrap(); - let actor_out_record_cnt = RelabeledGuardedIntCounterVec::with_metric_level_relabel_n( - MetricLevel::Debug, - actor_out_record_cnt, - level, - 1, - ); + .unwrap() + .relabel_debug_1(level); let actor_count = register_guarded_int_gauge_vec_with_registry!( "stream_actor_count",