From fe8ca2a440aa5cf7f680cd5c384f248b6c11551a Mon Sep 17 00:00:00 2001 From: Ethan <39577870+ethanndickson@users.noreply.github.com> Date: Mon, 25 Aug 2025 12:45:31 +1000 Subject: [PATCH] chore(scaletest): add deployment name to all metrics (#19479) If multiple of `alpha`, `bravo` or `charlie` are running simultaneously, we'll have trouble differentiating the metrics. To fix this, we'll add that name to all metrics. image --- scaletest/terraform/action/prometheus.tf | 3 +++ scaletest/terraform/action/prometheus_helm_values.tftpl | 1 + 2 files changed, 4 insertions(+) diff --git a/scaletest/terraform/action/prometheus.tf b/scaletest/terraform/action/prometheus.tf index 63b22df091..6898e0cfbd 100644 --- a/scaletest/terraform/action/prometheus.tf +++ b/scaletest/terraform/action/prometheus.tf @@ -17,6 +17,7 @@ resource "helm_release" "prometheus_chart_primary" { name = local.prometheus_release_name namespace = kubernetes_namespace.coder_primary.metadata.0.name values = [templatefile("${path.module}/prometheus_helm_values.tftpl", { + deployment_name = var.name, nodepool = google_container_node_pool.node_pool["primary_misc"].name, cluster = "primary", prometheus_remote_write_url = var.prometheus_remote_write_url, @@ -104,6 +105,7 @@ resource "helm_release" "prometheus_chart_europe" { name = local.prometheus_release_name namespace = kubernetes_namespace.coder_europe.metadata.0.name values = [templatefile("${path.module}/prometheus_helm_values.tftpl", { + deployment_name = var.name, nodepool = google_container_node_pool.node_pool["europe_misc"].name, cluster = "europe", prometheus_remote_write_url = var.prometheus_remote_write_url, @@ -141,6 +143,7 @@ resource "helm_release" "prometheus_chart_asia" { name = local.prometheus_release_name namespace = kubernetes_namespace.coder_asia.metadata.0.name values = [templatefile("${path.module}/prometheus_helm_values.tftpl", { + deployment_name = var.name, nodepool = google_container_node_pool.node_pool["asia_misc"].name, cluster = "asia", prometheus_remote_write_url = var.prometheus_remote_write_url, diff --git a/scaletest/terraform/action/prometheus_helm_values.tftpl b/scaletest/terraform/action/prometheus_helm_values.tftpl index e5e32b3fea..eefe5a88ba 100644 --- a/scaletest/terraform/action/prometheus_helm_values.tftpl +++ b/scaletest/terraform/action/prometheus_helm_values.tftpl @@ -22,6 +22,7 @@ prometheus: values: ["${nodepool}"] prometheusSpec: externalLabels: + deployment_name: "${deployment_name}" cluster: "${cluster}" podMonitorSelectorNilUsesHelmValues: false serviceMonitorSelectorNilUsesHelmValues: false