diff --git a/.changelog/17888.txt b/.changelog/17888.txt new file mode 100644 index 000000000..f50fcae09 --- /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 diff --git a/command/connect/envoy/bootstrap_config.go b/command/connect/envoy/bootstrap_config.go index a50eaf36f..2a0e21c4d 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 } }` diff --git a/command/connect/envoy/bootstrap_config_test.go b/command/connect/envoy/bootstrap_config_test.go index 8de9ae007..293aee660 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 7c584864a..3977ce65b 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 } } ],