@@ -25,9 +25,26 @@ You can configure how internal metrics are generated and exposed by the
25
25
Collector. By default, the Collector generates basic metrics about itself and
26
26
exposes them using the OpenTelemetry Go
27
27
[ Prometheus exporter] ( https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/prometheus )
28
- for scraping at ` http://127.0.0.1:8888/metrics ` . You can expose the endpoint to
29
- one specific or all network interfaces when needed. For containerized
30
- environments, you might want to expose this port on a public interface.
28
+ for scraping at ` http://127.0.0.1:8888/metrics ` .
29
+
30
+ The Collector can push its internal metrics to an OTLP backend via the following
31
+ configuration:
32
+
33
+ ``` yaml
34
+ service :
35
+ telemetry :
36
+ metrics :
37
+ readers :
38
+ - periodic :
39
+ exporter :
40
+ otlp :
41
+ protocol : grpc/protobuf
42
+ endpoint : http://localhost:14317
43
+ ` ` `
44
+
45
+ Alternatively, you can expose the Prometheus endpoint to one specific or all
46
+ network interfaces when needed. For containerized environments, you might want
47
+ to expose this port on a public interface.
31
48
32
49
Set the Prometheus config under ` service::telemetry::metrics`:
33
50
@@ -151,69 +168,6 @@ Note that the `tracer_provider` section there corresponds to `traces` here.
151
168
[kitchen-sink-config] :
152
169
https://github.com/open-telemetry/opentelemetry-configuration/blob/main/examples/kitchen-sink.yaml
153
170
154
- # ## Self-monitoring
155
-
156
- The Collector can be configured to push its own telemetry to an
157
- [OTLP receiver](https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver)
158
- and send the data through configured pipelines. In the following example, the
159
- Collector is configured to push metrics, traces, and logs every 10s using OTLP
160
- gRPC to `localhost:14317` :
161
-
162
- ` ` ` yaml
163
- receivers:
164
- otlp/internal:
165
- protocols:
166
- grpc:
167
- endpoint: localhost:14317
168
- exporters:
169
- debug:
170
- service:
171
- pipelines:
172
- metrics:
173
- receivers: [otlp/internal]
174
- exporters: [debug]
175
- traces:
176
- receivers: [otlp/internal]
177
- exporters: [debug]
178
- telemetry:
179
- metrics:
180
- readers:
181
- - periodic:
182
- interval: 10000
183
- exporter:
184
- otlp:
185
- protocol: grpc/protobuf
186
- endpoint: http://localhost:14317
187
- traces:
188
- processors:
189
- - batch:
190
- exporter:
191
- otlp:
192
- protocol: grpc/protobuf
193
- endpoint: http://localhost:14317
194
- logs:
195
- processors:
196
- - batch:
197
- exporter:
198
- otlp:
199
- protocol: grpc/protobuf
200
- endpoint: http://localhost:14317
201
- ` ` `
202
-
203
- {{% alert title="Caution" color="warning" %}}
204
-
205
- When self-monitoring, the Collector collects its own telemetry and sends it to
206
- the desired backend for analysis. This can be a risky practice. If the Collector
207
- is underperforming, its self-monitoring capability could be impacted. As a
208
- result, the self-monitored telemetry might not reach the backend in time for
209
- critical analysis.
210
-
211
- Moreover, sending internal telemetry through the Collector's own pipelines can
212
- create a continuous loop of spans, metric points, or logs, putting undue strain
213
- on the Collector's performance. This setup should not be used in production.
214
-
215
- {{% /alert %}}
216
-
217
171
# # Types of internal telemetry
218
172
219
173
The OpenTelemetry Collector aims to be a model of observable service by clearly
0 commit comments