From 94584cf5402c11e5a3c93467d43a8ad97af8d6b3 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 26 Jun 2023 18:47:26 -0400 Subject: [PATCH 1/3] Add emit_tags_as_labels to envoy --- command/connect/envoy/bootstrap_config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/connect/envoy/bootstrap_config.go b/command/connect/envoy/bootstrap_config.go index a50eaf36fe06..2a0e21c4d25d 100644 --- a/command/connect/envoy/bootstrap_config.go +++ b/command/connect/envoy/bootstrap_config.go @@ -847,7 +847,8 @@ func appendTelemetryCollectorConfig(args *BootstrapTplArgs, telemetryCollectorBi "envoy_grpc": { "cluster_name": "consul_telemetry_collector_loopback" } - } + }, + "emit_tags_as_labels": true } }` From aed6a006935182f2ce0efd14c3cbef8168c78975 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 26 Jun 2023 18:54:10 -0400 Subject: [PATCH 2/3] Update tests --- command/connect/envoy/bootstrap_config_test.go | 6 ++++-- command/connect/envoy/testdata/telemetry-collector.golden | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/command/connect/envoy/bootstrap_config_test.go b/command/connect/envoy/bootstrap_config_test.go index 8de9ae007d6a..293aee660091 100644 --- a/command/connect/envoy/bootstrap_config_test.go +++ b/command/connect/envoy/bootstrap_config_test.go @@ -539,7 +539,8 @@ const ( "envoy_grpc": { "cluster_name": "consul_telemetry_collector_loopback" } - } + }, + "emit_tags_as_labels": true } }` @@ -638,7 +639,8 @@ func TestBootstrapConfig_ConfigureArgs(t *testing.T) { "envoy_grpc": { "cluster_name": "consul_telemetry_collector_loopback" } - } + }, + "emit_tags_as_labels": true } }`, StaticClustersJSON: `{ diff --git a/command/connect/envoy/testdata/telemetry-collector.golden b/command/connect/envoy/testdata/telemetry-collector.golden index 7c584864a0be..3977ce65bba3 100644 --- a/command/connect/envoy/testdata/telemetry-collector.golden +++ b/command/connect/envoy/testdata/telemetry-collector.golden @@ -89,7 +89,8 @@ "envoy_grpc": { "cluster_name": "consul_telemetry_collector_loopback" } - } + }, + "emit_tags_as_labels": true } } ], From 2eb7a2a0670ce5ad69f7855615514722e2b4ace3 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 26 Jun 2023 18:56:09 -0400 Subject: [PATCH 3/3] Add changelog --- .changelog/17888.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/17888.txt diff --git a/.changelog/17888.txt b/.changelog/17888.txt new file mode 100644 index 000000000000..f50fcae09b07 --- /dev/null +++ b/.changelog/17888.txt @@ -0,0 +1,3 @@ +```release-note:improvement +connect: Add capture group labels from Envoy cluster FQDNs to Envoy exported metric labels +``` \ No newline at end of file