Skip to content

Commit f625496

Browse files
mx-psitammy-baylis-swiotelbot[bot]
authored
[content/en/docs] Remove references to the batch processor (#8270)
Co-authored-by: Tammy Baylis <[email protected]> Co-authored-by: otelbot <[email protected]>
1 parent 93d9e21 commit f625496

File tree

14 files changed

+59
-104
lines changed

14 files changed

+59
-104
lines changed

content/en/docs/collector/architecture.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ service:
7575
pipelines: # section that can contain multiple subsections, one per pipeline
7676
traces: # type of the pipeline
7777
receivers: [otlp, zipkin]
78-
processors: [memory_limiter, batch]
78+
processors: [memory_limiter]
7979
exporters: [otlp, zipkin]
8080
```
8181
@@ -102,7 +102,7 @@ service:
102102
pipelines:
103103
traces: # a pipeline of “traces” type
104104
receivers: [otlp]
105-
processors: [memory_limiter, batch]
105+
processors: [memory_limiter]
106106
exporters: [otlp]
107107
traces/2: # another pipeline of “traces” type
108108
receivers: [otlp]
@@ -210,26 +210,29 @@ The same name of the processor can be referenced in the `processors` key of
210210
multiple pipelines. In this case, the same configuration is used for each of
211211
these processors, but each pipeline always gets its own instance of the
212212
processor. Each of these processors has its own state, and the processors are
213-
never shared between pipelines. For example, if `batch` processor is used in
214-
several pipelines, each pipeline has its own batch processor, but each batch
215-
processor is configured exactly the same way if they reference the same key in
216-
the configuration. See the following configuration:
213+
never shared between pipelines. For example, if the `transform` processor is
214+
used in several pipelines, each pipeline has its own transform processor, but
215+
each transform processor is configured exactly the same way if they reference
216+
the same key in the configuration. See the following configuration:
217217

218218
```yaml
219219
processors:
220-
batch:
221-
send_batch_size: 10000
222-
timeout: 10s
220+
transform:
221+
error_mode: ignore
222+
trace_statements:
223+
- set(resource.attributes["namespace"],
224+
resource.attributes["k8s.namespace.name"])
225+
- delete_key(resource.attributes, "k8s.namespace.name")
223226

224227
service:
225228
pipelines:
226229
traces: # a pipeline of “traces” type
227230
receivers: [zipkin]
228-
processors: [batch]
231+
processors: [transform]
229232
exporters: [otlp]
230233
traces/2: # another pipeline of “traces” type
231234
receivers: [otlp]
232-
processors: [batch]
235+
processors: [transform]
233236
exporters: [otlp]
234237
```
235238
@@ -240,7 +243,7 @@ When the Collector loads this config, the result looks like this diagram:
240243
title: Pipeline "traces"
241244
---
242245
flowchart LR
243-
R1("`zipkin Receiver`") --> P1["`#quot;batch#quot; Processor`"]
246+
R1("`zipkin Receiver`") --> P1["`#quot;transform#quot; Processor`"]
244247
P1 --> E1[["`#quot;otlp#quot; Exporter`"]]
245248
```
246249

@@ -249,12 +252,12 @@ flowchart LR
249252
title: Pipeline "traces/2"
250253
---
251254
flowchart LR
252-
R1("`otlp Receiver`") --> P1["`#quot;batch#quot; Processor`"]
255+
R1("`otlp Receiver`") --> P1["`#quot;transform#quot; Processor`"]
253256
P1 --> E1[["`#quot;otlp#quot; Exporter`"]]
254257
```
255258

256-
Note that each `batch` processor is an independent instance, although they are
257-
configured the same way with a `send_batch_size` of `10000`.
259+
Note that each `transform` processor is an independent instance, although they
260+
are configured the same way with a `send_batch_size` of `10000`.
258261

259262
> The same name of the processor must not be referenced multiple times in the
260263
> `processors` key of a single pipeline.

content/en/docs/collector/building/receiver.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ Collector's components and pipelines.
9797
touch config.yaml
9898
```
9999

100-
For now, you just need a basic traces pipeline with the `otlp` receiver, the
101-
`otlp` and `debug`[^1] exporters, and optionally the `batch` processor. Here is
102-
what your `config.yaml` file should look like:
100+
For now, you just need a basic traces pipeline with the `otlp` receiver and the
101+
`otlp` and `debug`[^1] exporters. Here is what your `config.yaml` file should
102+
look like:
103103

104104
> config.yaml
105105
@@ -110,9 +110,6 @@ receivers:
110110
grpc:
111111
endpoint: 0.0.0.0:4317
112112

113-
processors:
114-
batch:
115-
116113
exporters:
117114
# NOTE: Prior to v0.86.0 use `logging` instead of `debug`.
118115
debug:
@@ -121,12 +118,13 @@ exporters:
121118
endpoint: localhost:14317
122119
tls:
123120
insecure: true
121+
sending_queue:
122+
batch:
124123

125124
service:
126125
pipelines:
127126
traces:
128127
receivers: [otlp]
129-
processors: [batch]
130128
exporters: [otlp/jaeger, debug]
131129
telemetry:
132130
logs:
@@ -975,7 +973,6 @@ import (
975973
"go.opentelemetry.io/collector/receiver"
976974
debugexporter "go.opentelemetry.io/collector/exporter/debugexporter"
977975
otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter"
978-
batchprocessor "go.opentelemetry.io/collector/processor/batchprocessor"
979976
otlpreceiver "go.opentelemetry.io/collector/receiver/otlpreceiver"
980977
tailtracer "github.com/open-telemetry/opentelemetry-tutorials/trace-receiver/tailtracer" // newly added line
981978
)
@@ -1007,7 +1004,6 @@ func components() (otelcol.Factories, error) {
10071004
}
10081005

10091006
factories.Processors, err = otelcol.MakeFactoryMap[processor.Factory](
1010-
batchprocessor.NewFactory(),
10111007
)
10121008
if err != nil {
10131009
return otelcol.Factories{}, err
@@ -1046,9 +1042,6 @@ receivers:
10461042
interval: 1m
10471043
number_of_traces: 1
10481044

1049-
processors:
1050-
batch:
1051-
10521045
exporters:
10531046
# NOTE: Prior to v0.86.0 use `logging` instead of `debug`.
10541047
debug:
@@ -1057,12 +1050,13 @@ exporters:
10571050
endpoint: localhost:14317
10581051
tls:
10591052
insecure: true
1053+
sending_queue:
1054+
batch:
10601055

10611056
service:
10621057
pipelines:
10631058
traces:
10641059
receivers: [otlp, tailtracer]
1065-
processors: [batch]
10661060
exporters: [otlp/jaeger, debug]
10671061
telemetry:
10681062
logs:
@@ -1084,7 +1078,6 @@ The output should look like this:
10841078
2023-11-08T21:38:36.621+0800 info [email protected]/telemetry.go:201 Serving Prometheus metrics {"address": ":8888", "level": "Basic"}
10851079
2023-11-08T21:38:36.621+0800 info [email protected]/exporter.go:275 Development component. May change in the future. {"kind": "exporter", "data_type": "traces", "name": "debug"}
10861080
2023-11-08T21:38:36.621+0800 debug [email protected]/exporter.go:273 Stable component. {"kind": "exporter", "data_type": "traces", "name": "otlp/jaeger"}
1087-
2023-11-08T21:38:36.621+0800 debug [email protected]/processor.go:287 Stable component. {"kind": "processor", "name": "batch", "pipeline": "traces"}
10881081
2023-11-08T21:38:36.621+0800 debug [email protected]/receiver.go:294 Stable component. {"kind": "receiver", "name": "otlp", "data_type": "traces"}
10891082
2023-11-08T21:38:36.621+0800 debug [email protected]/receiver.go:294 Alpha component. May change in the future. {"kind": "receiver", "name": "tailtracer", "data_type": "traces"}
10901083
2023-11-08T21:38:36.622+0800 info [email protected]/service.go:143 Starting otelcol-dev... {"Version": "1.0.0", "NumCPU": 10}
@@ -2283,7 +2276,6 @@ And you should see the output like this after a few minutes:
22832276
2023-11-09T11:38:19.890+0800 info [email protected]/telemetry.go:201 Serving Prometheus metrics {"address": ":8888", "level": "Basic"}
22842277
2023-11-09T11:38:19.890+0800 debug [email protected]/exporter.go:273 Stable component. {"kind": "exporter", "data_type": "traces", "name": "otlp/jaeger"}
22852278
2023-11-09T11:38:19.890+0800 info [email protected]/exporter.go:275 Development component. May change in the future. {"kind": "exporter", "data_type": "traces", "name": "debug"}
2286-
2023-11-09T11:38:19.890+0800 debug [email protected]/processor.go:287 Stable component. {"kind": "processor", "name": "batch", "pipeline": "traces"}
22872279
2023-11-09T11:38:19.891+0800 debug [email protected]/receiver.go:294 Stable component. {"kind": "receiver", "name": "otlp", "data_type": "traces"}
22882280
2023-11-09T11:38:19.891+0800 debug [email protected]/receiver.go:294 Alpha component. May change in the future. {"kind": "receiver", "name": "tailtracer", "data_type": "traces"}
22892281
2023-11-09T11:38:19.891+0800 info [email protected]/service.go:143 Starting otelcol-dev... {"Version": "1.0.0", "NumCPU": 10}

content/en/docs/collector/configuration.md

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ receivers:
111111
endpoint: 0.0.0.0:4317
112112
http:
113113
endpoint: 0.0.0.0:4318
114-
processors:
115-
batch:
116114

117115
exporters:
118116
otlp:
119117
endpoint: otelcol:4317
118+
sending_queue:
119+
batch:
120120

121121
extensions:
122122
health_check:
@@ -131,15 +131,12 @@ service:
131131
pipelines:
132132
traces:
133133
receivers: [otlp]
134-
processors: [batch]
135134
exporters: [otlp]
136135
metrics:
137136
receivers: [otlp]
138-
processors: [batch]
139137
exporters: [otlp]
140138
logs:
141139
receivers: [otlp]
142-
processors: [batch]
143140
exporters: [otlp]
144141
```
145142
@@ -161,15 +158,15 @@ receivers:
161158
grpc:
162159
endpoint: 0.0.0.0:55690
163160
164-
processors:
165-
batch:
166-
batch/test:
167-
168161
exporters:
169162
otlp:
170163
endpoint: otelcol:4317
164+
sending_queue:
165+
batch:
171166
otlp/2:
172167
endpoint: otelcol2:4317
168+
sending_queue:
169+
batch:
173170
174171
extensions:
175172
health_check:
@@ -184,19 +181,15 @@ service:
184181
pipelines:
185182
traces:
186183
receivers: [otlp]
187-
processors: [batch]
188184
exporters: [otlp]
189185
traces/2:
190186
receivers: [otlp/2]
191-
processors: [batch/test]
192187
exporters: [otlp/2]
193188
metrics:
194189
receivers: [otlp]
195-
processors: [batch]
196190
exporters: [otlp]
197191
logs:
198192
receivers: [otlp]
199-
processors: [batch]
200193
exporters: [otlp]
201194
```
202195

@@ -367,9 +360,6 @@ processors:
367360
- key: email
368361
action: hash
369362
370-
# Data sources: traces, metrics, logs
371-
batch:
372-
373363
# Data sources: metrics, metrics, logs
374364
filter:
375365
error_mode: ignore
@@ -640,11 +630,10 @@ service:
640630
pipelines:
641631
metrics:
642632
receivers: [opencensus, prometheus]
643-
processors: [batch]
644633
exporters: [opencensus, prometheus]
645634
traces:
646635
receivers: [opencensus, jaeger]
647-
processors: [batch, memory_limiter]
636+
processors: [memory_limiter]
648637
exporters: [opencensus, zipkin]
649638
```
650639

@@ -659,7 +648,6 @@ service:
659648
# ...
660649
traces/2:
661650
receivers: [opencensus]
662-
processors: [batch]
663651
exporters: [zipkin]
664652
```
665653

content/en/docs/collector/custom-collector.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Building a custom collector
33
weight: 29
44
# prettier-ignore
5-
cSpell:ignore: batchprocessor chipset darwin debugexporter gomod loggingexporter otlpexporter otlpreceiver wyrtw
5+
cSpell:ignore: chipset darwin debugexporter gomod loggingexporter otlpexporter otlpreceiver wyrtw
66
---
77

88
If you are planning to build and debug custom collector receivers, processors,
@@ -314,8 +314,6 @@ receivers:
314314
endpoint: 0.0.0.0:4317
315315
http:
316316
endpoint: 0.0.0.0:4318
317-
processors:
318-
batch:
319317
320318
exporters:
321319
debug:
@@ -325,15 +323,12 @@ service:
325323
pipelines:
326324
traces:
327325
receivers: [otlp]
328-
processors: [batch]
329326
exporters: [debug]
330327
metrics:
331328
receivers: [otlp]
332-
processors: [batch]
333329
exporters: [debug]
334330
logs:
335331
receivers: [otlp]
336-
processors: [batch]
337332
exporters: [debug]
338333
```
339334

content/en/docs/collector/deployment/agent.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,16 @@ receivers:
4545
http:
4646
endpoint: 0.0.0.0:4318
4747

48-
processors:
49-
batch:
50-
5148
exporters:
5249
otlp/jaeger: # Jaeger supports OTLP directly
5350
endpoint: https://jaeger.example.com:4317
51+
sending_queue:
52+
batch:
5453

5554
service:
5655
pipelines:
5756
traces/dev:
5857
receivers: [otlp]
59-
processors: [batch]
6058
exporters: [otlp/jaeger]
6159
```
6260
@@ -69,18 +67,16 @@ receivers:
6967
http:
7068
endpoint: 0.0.0.0:4318
7169

72-
processors:
73-
batch:
74-
7570
exporters:
7671
prometheusremotewrite: # the PRW exporter, to ingest metrics to backend
7772
endpoint: https://prw.example.com/v1/api/remote_write
73+
sending_queue:
74+
batch:
7875

7976
service:
8077
pipelines:
8178
metrics/prod:
8279
receivers: [otlp]
83-
processors: [batch]
8480
exporters: [prometheusremotewrite]
8581
```
8682
@@ -93,9 +89,6 @@ receivers:
9389
http:
9490
endpoint: 0.0.0.0:4318
9591

96-
processors:
97-
batch:
98-
9992
exporters:
10093
file: # the File Exporter, to ingest logs to local file
10194
path: ./app42_example.log
@@ -105,7 +98,6 @@ service:
10598
pipelines:
10699
logs/dev:
107100
receivers: [otlp]
108-
processors: [batch]
109101
exporters: [file]
110102
```
111103

content/en/docs/collector/troubleshooting.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,9 @@ The Collector might drop data for a variety of reasons, but the most common are:
286286
- The exporter destination is unavailable or accepting the data too slowly.
287287

288288
To mitigate drops, configure the
289-
[`batch` processor](https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/batchprocessor/README.md).
290-
In addition, it might be necessary to configure the
291289
[queued retry options](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/exporterhelper#configuration)
292-
on enabled exporters.
290+
on enabled exporters, in particular the
291+
[Sending queue batch settings](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/exporterhelper#sending-queue-batch-settings).
293292

294293
#### Collector is not receiving data
295294

0 commit comments

Comments
 (0)