@@ -14,8 +14,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
1414 $.panel('Latency' ) +
1515 utils.latencyRecordingRulePanel('cortex_request_duration_seconds' , $.jobSelector($._config.job_names.gateway) + [utils.selector.re('route' , 'api_prom_api_v1_.+' )])
1616 )
17- .addPanelIf(
18- $._config.per_instance_label != '' ,
17+ .addPanel(
1918 $.panel('Per %s p99 Latency' % $._config.per_instance_label) +
2019 $.hiddenLegendQueryPanel(
2120 'histogram_quantile(0.99, sum by(le, %s) (rate(cortex_request_duration_seconds_bucket{%s, route=~"api_prom_api_v1_.+"}[$__interval])))' % [$._config.per_instance_label, $.jobMatcherEquality($._config.job_names.gateway)], ''
@@ -33,8 +32,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
3332 $.panel('Latency' ) +
3433 utils.latencyRecordingRulePanel('cortex_request_duration_seconds' , $.jobSelector($._config.job_names.query_frontend) + [utils.selector.re('route' , 'api_prom_api_v1_.+' )])
3534 )
36- .addPanelIf(
37- $._config.per_instance_label != '' ,
35+ .addPanel(
3836 $.panel('Per %s p99 Latency' % $._config.per_instance_label) +
3937 $.hiddenLegendQueryPanel(
4038 'histogram_quantile(0.99, sum by(le, %s) (rate(cortex_request_duration_seconds_bucket{%s, route=~"api_prom_api_v1_.+"}[$__interval])))' % [$._config.per_instance_label, $.jobMatcherEquality($._config.job_names.query_frontend)], ''
@@ -63,8 +61,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
6361 $.panel('Latency' ) +
6462 utils.latencyRecordingRulePanel('cortex_request_duration_seconds' , $.jobSelector($._config.job_names.querier) + [utils.selector.re('route' , 'api_prom_api_v1_.+' )])
6563 )
66- .addPanelIf(
67- $._config.per_instance_label != '' ,
64+ .addPanel(
6865 $.panel('Per %s p99 Latency' % $._config.per_instance_label) +
6966 $.hiddenLegendQueryPanel(
7067 'histogram_quantile(0.99, sum by(le, %s) (rate(cortex_request_duration_seconds_bucket{%s, route=~"api_prom_api_v1_.+"}[$__interval])))' % [$._config.per_instance_label, $.jobMatcherEquality($._config.job_names.querier)], ''
@@ -82,8 +79,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
8279 $.panel('Latency' ) +
8380 utils.latencyRecordingRulePanel('cortex_request_duration_seconds' , $.jobSelector($._config.job_names.ingester) + [utils.selector.re('route' , '/cortex.Ingester/Query(Stream)?|/cortex.Ingester/MetricsForLabelMatchers|/cortex.Ingester/LabelValues|/cortex.Ingester/MetricsMetadata' )])
8481 )
85- .addPanelIf(
86- $._config.per_instance_label != '' ,
82+ .addPanel(
8783 $.panel('Per %s p99 Latency' % $._config.per_instance_label) +
8884 $.hiddenLegendQueryPanel(
8985 'histogram_quantile(0.99, sum by(le, %s) (rate(cortex_request_duration_seconds_bucket{%s, route=~"/cortex.Ingester/Query(Stream)?|/cortex.Ingester/MetricsForLabelMatchers|/cortex.Ingester/LabelValues|/cortex.Ingester/MetricsMetadata"}[$__interval])))' % [$._config.per_instance_label, $.jobMatcherEquality($._config.job_names.ingester)], ''
@@ -102,8 +98,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
10298 $.panel('Latency' ) +
10399 utils.latencyRecordingRulePanel('cortex_request_duration_seconds' , $.jobSelector($._config.job_names.store_gateway) + [utils.selector.re('route' , '/gatewaypb.StoreGateway/.*' )])
104100 )
105- .addPanelIf(
106- $._config.per_instance_label != '' ,
101+ .addPanel(
107102 $.panel('Per %s p99 Latency' % $._config.per_instance_label) +
108103 $.hiddenLegendQueryPanel(
109104 'histogram_quantile(0.99, sum by(le, %s) (rate(cortex_request_duration_seconds_bucket{%s, route=~"/gatewaypb.StoreGateway/.*"}[$__interval])))' % [$._config.per_instance_label, $.jobMatcherEquality($._config.job_names.store_gateway)], ''
0 commit comments