Skip to content

Commit cdf711f

Browse files
authored
Added documentation for telemetry section (open-telemetry#1211)
1 parent 977b137 commit cdf711f

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

content/en/docs/collector/configuration.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,11 @@ The service section is used to configure what components are enabled in the
379379
Collector based on the configuration found in the receivers, processors,
380380
exporters, and extensions sections. If a component is configured, but not
381381
defined within the service section then it is not enabled. The service section
382-
consists of two sub-sections:
382+
consists of three sub-sections:
383383

384384
- extensions
385385
- pipelines
386+
- telemetry
386387

387388
Extensions consist of a list of all extensions to enable. For example:
388389

@@ -422,6 +423,26 @@ service:
422423
exporters: [opencensus, zipkin]
423424
```
424425

426+
Telemetry is where the telemetry for the collector itself can be configured. It has two subsections: `logs` and `metrics`.
427+
428+
The `logs` subsection allows configuration of the logs generated by the collector. By default the collector will write its logs to stderr with a log level of `INFO`. You can also add static key-value pairs to all logs using the `initial_fields` section. [View the full list of `logs` options here.](https://github.com/open-telemetry/opentelemetry-collector/blob/7666eb04c30e5cfd750db9969fe507562598f0ae/config/service.go#L41-L97)
429+
430+
The `metrics` subsection allows configuration of the metrics generated by the collector. By default the collector will generate basic metrics about itself and expose them for scraping at `localhost:8888/metrics` [View the full list of `metrics` options here.](https://github.com/open-telemetry/opentelemetry-collector/blob/7666eb04c30e5cfd750db9969fe507562598f0ae/config/service.go#L99-L111)
431+
432+
The following is an example telemetry configuration:
433+
434+
```yaml
435+
service:
436+
telemetry:
437+
logs:
438+
level: debug
439+
initial_fields:
440+
service: my-instance
441+
metrics:
442+
level: detailed
443+
address: 0.0.0.0:8888
444+
```
445+
425446
## Other Information
426447

427448
### Configuration Environment Variables

0 commit comments

Comments
 (0)