diff --git a/internal/controller/telemetry/otel_col_conf_test_fixtures/complex.yaml b/internal/controller/telemetry/otel_col_conf_test_fixtures/complex.yaml index 53e2180..425b384 100644 --- a/internal/controller/telemetry/otel_col_conf_test_fixtures/complex.yaml +++ b/internal/controller/telemetry/otel_col_conf_test_fixtures/complex.yaml @@ -126,7 +126,6 @@ exporters: insecure: true fluentforwardexporter/collector_fluentforward-test-output: endpoint: fluentforward.example-tenant-ns.svc.cluster.local:8888 - map_metadata: true tls: insecure: true otlp/collector_otlp-test-output: @@ -168,23 +167,6 @@ processors: - action: insert key: loki.attribute.labels value: tenant - attributes/fluentforward_exporter_fluentforward-test-output: - actions: - - action: insert - from_attribute: k8s.pod.name - key: kubernetes.pod_name - - action: insert - from_attribute: k8s.pod.uid - key: kubernetes.pod_id - - action: insert - from_attribute: k8s.pod.labels - key: kubernetes.labels - - action: insert - from_attribute: k8s.namespace.name - key: kubernetes.namespace_name - - action: insert - from_attribute: k8s.container.name - key: kubernetes.container_name attributes/subscription_subscription-example-1: actions: - action: insert @@ -242,6 +224,14 @@ processors: - action: insert key: loki.resource.labels value: k8s.pod.name, k8s.namespace.name + transform/fluentforward_exporter_fluentforward-test-output: + log_statements: + - context: log + statements: + - set(attributes["kubernetes.pod"], resource.attributes["k8s.pod.name"]) + - set(attributes["kubernetes.labels"], resource.attributes["k8s.pod.labels.app.kubernetes.io/name"]) + - set(attributes["kubernetes.namespace_name"], resource.attributes["k8s.namespace.name"]) + - set(attributes["kubernetes.container_name"], resource.attributes["k8s.container.name"]) connectors: count/output_metrics: logs: @@ -322,8 +312,8 @@ service: exporters: [otlp/collector_otlp-test-output-2, count/output_metrics] logs/output_example-tenant-b-ns_subscription-example-3_collector_fluentforward-test-output: receivers: [routing/subscription_example-tenant-b-ns_subscription-example-3_outputs] - processors: [memory_limiter, attributes/fluentforward_exporter_fluentforward-test-output] - exporters: [fluentforwardexporter/collector_fluentforward-test-output] + processors: [memory_limiter, attributes/exporter_name_fluentforward-test-output, transform/fluentforward_exporter_fluentforward-test-output] + exporters: [fluentforwardexporter/collector_fluentforward-test-output, count/output_metrics] logs/tenant_example-tenant-a_subscription_example-tenant-a-ns_subscription-example-1: receivers: [routing/tenant_example-tenant-a_subscriptions] processors: [memory_limiter, attributes/subscription_subscription-example-1]