From 9379574a7d7c24e32fc55ea30378869e65a43006 Mon Sep 17 00:00:00 2001 From: Dinesh Gurumurthy Date: Wed, 21 Feb 2024 12:58:36 -0500 Subject: [PATCH] Remove batch processor from traces pipeline (#22757) Remove batch processor from traces pipeline Co-authored-by: ahmed-mez <38987709+ahmed-mez@users.noreply.github.com> --- .../map_provider_config_not_serverless.go | 5 -- .../otlp/map_provider_not_serverless_test.go | 75 ++++++------------- 2 files changed, 24 insertions(+), 56 deletions(-) diff --git a/comp/otelcol/otlp/map_provider_config_not_serverless.go b/comp/otelcol/otlp/map_provider_config_not_serverless.go index 939916dcbbc70..da1142ebbd4ea 100644 --- a/comp/otelcol/otlp/map_provider_config_not_serverless.go +++ b/comp/otelcol/otlp/map_provider_config_not_serverless.go @@ -15,10 +15,6 @@ const defaultTracesConfig string = ` receivers: otlp: -processors: - batch: - timeout: 10s - exporters: otlp: tls: @@ -32,7 +28,6 @@ service: pipelines: traces: receivers: [otlp] - processors: [batch] exporters: [otlp] ` diff --git a/comp/otelcol/otlp/map_provider_not_serverless_test.go b/comp/otelcol/otlp/map_provider_not_serverless_test.go index e2dbc22e6d482..037f4e00a9bf0 100644 --- a/comp/otelcol/otlp/map_provider_not_serverless_test.go +++ b/comp/otelcol/otlp/map_provider_not_serverless_test.go @@ -57,18 +57,12 @@ func TestNewMap(t *testing.T) { "endpoint": "localhost:5003", }, }, - "processors": map[string]interface{}{ - "batch": map[string]interface{}{ - "timeout": "10s", - }, - }, "service": map[string]interface{}{ "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp"}, }, }, }, @@ -135,9 +129,8 @@ func TestNewMap(t *testing.T) { "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp"}, }, "metrics": map[string]interface{}{ "receivers": []interface{}{"otlp"}, @@ -209,9 +202,8 @@ func TestNewMap(t *testing.T) { "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp"}, }, "metrics": map[string]interface{}{ "receivers": []interface{}{"otlp"}, @@ -245,11 +237,6 @@ func TestNewMap(t *testing.T) { }, }, }, - "processors": map[string]interface{}{ - "batch": map[string]interface{}{ - "timeout": "10s", - }, - }, "exporters": map[string]interface{}{ "otlp": map[string]interface{}{ "tls": map[string]interface{}{ @@ -263,9 +250,8 @@ func TestNewMap(t *testing.T) { "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp"}, }, }, }, @@ -352,11 +338,6 @@ func TestNewMap(t *testing.T) { }, }, }, - "processors": map[string]interface{}{ - "batch": map[string]interface{}{ - "timeout": "10s", - }, - }, "exporters": map[string]interface{}{ "otlp": map[string]interface{}{ "tls": map[string]interface{}{ @@ -373,9 +354,8 @@ func TestNewMap(t *testing.T) { "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp", "logging"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp", "logging"}, }, }, }, @@ -505,9 +485,8 @@ func TestNewMap(t *testing.T) { "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp", "logging"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp", "logging"}, }, "metrics": map[string]interface{}{ "receivers": []interface{}{"otlp"}, @@ -558,9 +537,8 @@ func TestNewMap(t *testing.T) { "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp"}, }, "logs": map[string]interface{}{ "receivers": []interface{}{"otlp"}, @@ -634,9 +612,8 @@ func TestNewMap(t *testing.T) { "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp"}, }, "metrics": map[string]interface{}{ "receivers": []interface{}{"otlp"}, @@ -715,9 +692,8 @@ func TestNewMap(t *testing.T) { "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp"}, }, "metrics": map[string]interface{}{ "receivers": []interface{}{"otlp"}, @@ -776,9 +752,8 @@ func TestNewMap(t *testing.T) { "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp"}, }, "logs": map[string]interface{}{ "receivers": []interface{}{"otlp"}, @@ -900,9 +875,8 @@ func TestNewMap(t *testing.T) { "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp", "logging"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp", "logging"}, }, "logs": map[string]interface{}{ "receivers": []interface{}{"otlp"}, @@ -1046,9 +1020,8 @@ func TestNewMap(t *testing.T) { "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ - "receivers": []interface{}{"otlp"}, - "processors": []interface{}{"batch"}, - "exporters": []interface{}{"otlp", "logging"}, + "receivers": []interface{}{"otlp"}, + "exporters": []interface{}{"otlp", "logging"}, }, "metrics": map[string]interface{}{ "receivers": []interface{}{"otlp"},