From 951572bd787efb77a66e34af0b6fb543ce48f5f3 Mon Sep 17 00:00:00 2001 From: Bruce Wenliang Chen Date: Mon, 9 Sep 2024 16:40:09 +0200 Subject: [PATCH] feat(metrics): remove dst_zone label, reduce number of latency buckets The buckets of the metrics are reduced to: 1, 10, 50, 100, 200, 300, 400, 500, 1000, 5000, 10000 zone (availability zone) is totally removed --- .github/workflows/release.yml | 2 +- linkerd/app/core/src/metrics.rs | 2 +- linkerd/metrics/src/latency.rs | 14 -------------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 39fb2fbe89..169591d9c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,7 @@ env: CARGO_INCREMENTAL: 0 CARGO_NET_RETRY: 10 RUSTFLAGS: "-D warnings -A deprecated" - RUSTUP_MAX_RETRIES: 11 + RUSTUP_MAX_RETRIES: 19 concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} diff --git a/linkerd/app/core/src/metrics.rs b/linkerd/app/core/src/metrics.rs index fd0f434938..32a751491e 100644 --- a/linkerd/app/core/src/metrics.rs +++ b/linkerd/app/core/src/metrics.rs @@ -142,7 +142,7 @@ where let mut out = format!("{}_{}=\"{}\"", prefix, k0, v0); for (k, v) in labels_iter { - if k == "pod" || k == "pod_template_hash" { + if k == "pod" || k == "pod_template_hash" || k == "zone" { continue; } diff --git a/linkerd/metrics/src/latency.rs b/linkerd/metrics/src/latency.rs index af094cb23e..81a40f889e 100644 --- a/linkerd/metrics/src/latency.rs +++ b/linkerd/metrics/src/latency.rs @@ -6,14 +6,7 @@ use super::histogram::{Bounds, Bucket, Histogram}; /// milliseconds. pub const BOUNDS: &Bounds = &Bounds(&[ Bucket::Le(1.0), - Bucket::Le(2.0), - Bucket::Le(3.0), - Bucket::Le(4.0), - Bucket::Le(5.0), Bucket::Le(10.0), - Bucket::Le(20.0), - Bucket::Le(30.0), - Bucket::Le(40.0), Bucket::Le(50.0), Bucket::Le(100.0), Bucket::Le(200.0), @@ -21,15 +14,8 @@ pub const BOUNDS: &Bounds = &Bounds(&[ Bucket::Le(400.0), Bucket::Le(500.0), Bucket::Le(1_000.0), - Bucket::Le(2_000.0), - Bucket::Le(3_000.0), - Bucket::Le(4_000.0), Bucket::Le(5_000.0), Bucket::Le(10_000.0), - Bucket::Le(20_000.0), - Bucket::Le(30_000.0), - Bucket::Le(40_000.0), - Bucket::Le(50_000.0), // A final upper bound. Bucket::Inf, ]);