@@ -168,6 +168,69 @@ Note that the `tracer_provider` section there corresponds to `traces` here.
168
168
[kitchen-sink-config] :
169
169
https://github.com/open-telemetry/opentelemetry-configuration/blob/main/examples/kitchen-sink.yaml
170
170
171
+ # ## Self-monitoring
172
+
173
+ The Collector can be configured to push its own telemetry to an
174
+ [OTLP receiver](https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver)
175
+ and send the data through configured pipelines. In the following example, the
176
+ Collector is configured to push metrics, traces, and logs every 10s using OTLP
177
+ gRPC to `localhost:14317` :
178
+
179
+ ` ` ` yaml
180
+ receivers:
181
+ otlp/internal:
182
+ protocols:
183
+ grpc:
184
+ endpoint: localhost:14317
185
+ exporters:
186
+ debug:
187
+ service:
188
+ pipelines:
189
+ metrics:
190
+ receivers: [otlp/internal]
191
+ exporters: [debug]
192
+ traces:
193
+ receivers: [otlp/internal]
194
+ exporters: [debug]
195
+ telemetry:
196
+ metrics:
197
+ readers:
198
+ - periodic:
199
+ interval: 10000
200
+ exporter:
201
+ otlp:
202
+ protocol: grpc/protobuf
203
+ endpoint: http://localhost:14317
204
+ traces:
205
+ processors:
206
+ - batch:
207
+ exporter:
208
+ otlp:
209
+ protocol: grpc/protobuf
210
+ endpoint: http://localhost:14317
211
+ logs:
212
+ processors:
213
+ - batch:
214
+ exporter:
215
+ otlp:
216
+ protocol: grpc/protobuf
217
+ endpoint: http://localhost:14317
218
+ ` ` `
219
+
220
+ {{% alert title="Caution" color="warning" %}}
221
+
222
+ When self-monitoring, the Collector collects its own telemetry and sends it to
223
+ the desired backend for analysis. This can be a risky practice. If the Collector
224
+ is underperforming, its self-monitoring capability could be impacted. As a
225
+ result, the self-monitored telemetry might not reach the backend in time for
226
+ critical analysis.
227
+
228
+ Moreover, sending internal telemetry through the Collector's own pipelines can
229
+ create a continuous loop of spans, metric points, or logs, putting undue strain
230
+ on the Collector's performance. This setup should not be used in production.
231
+
232
+ {{% /alert %}}
233
+
171
234
# # Types of internal telemetry
172
235
173
236
The OpenTelemetry Collector aims to be a model of observable service by clearly
0 commit comments