diff --git a/pkg/telemetry/vector.go b/pkg/telemetry/vector.go index b797da298..2e5e0acda 100644 --- a/pkg/telemetry/vector.go +++ b/pkg/telemetry/vector.go @@ -175,7 +175,7 @@ if err == null { Config: `source = ''' namespace, err = get_env_var("NAMESPACE") if err == null { - .namespace = namespace + .tags.namespace = namespace } ''' `, diff --git a/pkg/telemetry/vector_test.go b/pkg/telemetry/vector_test.go index 9bef3b06a..ef15f5b9e 100644 --- a/pkg/telemetry/vector_test.go +++ b/pkg/telemetry/vector_test.go @@ -231,7 +231,7 @@ inputs = ["cassandra_metrics_raw"] source = ''' namespace, err = get_env_var("NAMESPACE") if err == null { - .namespace = namespace + .tags.namespace = namespace } '''