diff --git a/docs/examples/tenant-to-tenant-routing/pipeline.yaml b/docs/examples/tenant-to-tenant-routing/pipeline.yaml index 48165ae..4e3b80d 100644 --- a/docs/examples/tenant-to-tenant-routing/pipeline.yaml +++ b/docs/examples/tenant-to-tenant-routing/pipeline.yaml @@ -15,12 +15,13 @@ metadata: collector: cluster name: shared spec: - transform: - name: parse-nginx - logStatements: - - context: log - statements: - - set(resource.attributes["parsed"], ExtractPatterns(body, "(?P(GET|PUT))")) + processors: + transform: + name: parse-nginx + logStatements: + - context: log + statements: + - set(resource.attributes["parsed"], ExtractPatterns(body, "(?P(GET|PUT))")) logSourceNamespaceSelectors: - matchLabels: tenant: shared diff --git a/e2e/testdata/tenants_with_bridges/tenants_with_bridges.yaml b/e2e/testdata/tenants_with_bridges/tenants_with_bridges.yaml index 48c5d8a..971d611 100644 --- a/e2e/testdata/tenants_with_bridges/tenants_with_bridges.yaml +++ b/e2e/testdata/tenants_with_bridges/tenants_with_bridges.yaml @@ -41,12 +41,13 @@ metadata: collector: cluster name: shared spec: - transform: - name: parse-nginx - logStatements: - - context: log - statements: - - set(resource.attributes["parsed"], ExtractPatterns(body, "(?P(GET|PUT))")) + processors: + transform: + name: parse-nginx + logStatements: + - context: log + statements: + - set(resource.attributes["parsed"], ExtractPatterns(body, "(?P(GET|PUT))")) logSourceNamespaceSelectors: - matchLabels: tenant: shared diff --git a/internal/controller/telemetry/otel_conf_gen/otel_col_conf_test_fixtures/complex.yaml b/internal/controller/telemetry/otel_conf_gen/otel_col_conf_test_fixtures/complex.yaml index 2bfb5eb..9536dd8 100644 --- a/internal/controller/telemetry/otel_conf_gen/otel_col_conf_test_fixtures/complex.yaml +++ b/internal/controller/telemetry/otel_conf_gen/otel_col_conf_test_fixtures/complex.yaml @@ -122,6 +122,12 @@ processors: - action: insert key: tenant value: example-tenant-b + batch/example-tenant-a: + send_batch_size: 8192 + timeout: 200ms + batch/example-tenant-b: + send_batch_size: 8192 + timeout: 200ms deltatocumulative: {} k8sattributes: auth_type: serviceAccount @@ -160,6 +166,7 @@ service: processors: - memory_limiter - attributes/exporter_name_loki-test-output + - batch/example-tenant-a receivers: - routing/subscription_example-tenant-a-ns_subscription-example-1_outputs logs/output_example-tenant-a-ns_subscription-example-1_collector_otlp-test-output: @@ -169,6 +176,7 @@ service: processors: - memory_limiter - attributes/exporter_name_otlp-test-output + - batch/example-tenant-a receivers: - routing/subscription_example-tenant-a-ns_subscription-example-1_outputs logs/output_example-tenant-a-ns_subscription-example-2_collector_otlp-test-output-2: @@ -178,6 +186,7 @@ service: processors: - memory_limiter - attributes/exporter_name_otlp-test-output-2 + - batch/example-tenant-a receivers: - routing/subscription_example-tenant-a-ns_subscription-example-2_outputs logs/output_example-tenant-b-ns_subscription-example-3_collector_fluentforward-test-output: @@ -187,6 +196,7 @@ service: processors: - memory_limiter - attributes/exporter_name_fluentforward-test-output + - batch/example-tenant-b receivers: - routing/subscription_example-tenant-b-ns_subscription-example-3_outputs logs/output_example-tenant-b-ns_subscription-example-3_collector_otlp-test-output-2: @@ -196,6 +206,7 @@ service: processors: - memory_limiter - attributes/exporter_name_otlp-test-output-2 + - batch/example-tenant-b receivers: - routing/subscription_example-tenant-b-ns_subscription-example-3_outputs logs/tenant_example-tenant-a: diff --git a/internal/controller/telemetry/otel_conf_gen/otel_conf_gen_test.go b/internal/controller/telemetry/otel_conf_gen/otel_conf_gen_test.go index c702559..5917938 100644 --- a/internal/controller/telemetry/otel_conf_gen/otel_conf_gen_test.go +++ b/internal/controller/telemetry/otel_conf_gen/otel_conf_gen_test.go @@ -299,6 +299,11 @@ func TestOtelColConfComplex(t *testing.T) { }, } + // Set Batch processor defaults + for i, tenant := range inputCfg.Tenants { + inputCfg.Tenants[i].Spec.SetDefaults(tenant.Name) + } + // Config // The receiver and exporter entries are not serialized because of tags on the underlying data structure. The tests won't contain them, this is a known issue.