diff --git a/.changelog/184.txt b/.changelog/184.txt new file mode 100644 index 00000000..f50fcae0 --- /dev/null +++ b/.changelog/184.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/internal/bootstrap/bootstrap_config.go b/internal/bootstrap/bootstrap_config.go index faf7b404..abfcf1b7 100644 --- a/internal/bootstrap/bootstrap_config.go +++ b/internal/bootstrap/bootstrap_config.go @@ -846,7 +846,8 @@ func appendTelemetryCollectorConfig(args *BootstrapTplArgs, telemetryCollectorBi "envoy_grpc": { "cluster_name": "consul_telemetry_collector_loopback" } - } + }, + "emit_tags_as_labels": true } }` diff --git a/internal/bootstrap/bootstrap_config_test.go b/internal/bootstrap/bootstrap_config_test.go index 53582677..fb070c51 100644 --- a/internal/bootstrap/bootstrap_config_test.go +++ b/internal/bootstrap/bootstrap_config_test.go @@ -540,7 +540,8 @@ const ( "envoy_grpc": { "cluster_name": "consul_telemetry_collector_loopback" } - } + }, + "emit_tags_as_labels": true } }` @@ -639,7 +640,8 @@ func TestBootstrapConfig_ConfigureArgs(t *testing.T) { "envoy_grpc": { "cluster_name": "consul_telemetry_collector_loopback" } - } + }, + "emit_tags_as_labels": true } }`, StaticClustersJSON: `{ diff --git a/pkg/consuldp/testdata/TestBootstrapConfig/hcp-metrics.golden b/pkg/consuldp/testdata/TestBootstrapConfig/hcp-metrics.golden index 52f70457..c37671de 100644 --- a/pkg/consuldp/testdata/TestBootstrapConfig/hcp-metrics.golden +++ b/pkg/consuldp/testdata/TestBootstrapConfig/hcp-metrics.golden @@ -90,7 +90,8 @@ "envoy_grpc": { "cluster_name": "consul_telemetry_collector_loopback" } - } + }, + "emit_tags_as_labels": true } } ],