Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for telemetry section #1211

Merged
merged 3 commits into from
Mar 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion content/en/docs/collector/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,11 @@ The service section is used to configure what components are enabled in the
Collector based on the configuration found in the receivers, processors,
exporters, and extensions sections. If a component is configured, but not
defined within the service section then it is not enabled. The service section
consists of two sub-sections:
consists of three sub-sections:

- extensions
- pipelines
- telemetry

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

Expand Down Expand Up @@ -422,6 +423,26 @@ service:
exporters: [opencensus, zipkin]
```

Telemetry is where the telemetry for the collector itself can be configured. It has two subsections: `logs` and `metrics`.

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)

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)

The following is an example telemetry configuration:

```yaml
service:
telemetry:
logs:
level: debug
initial_fields:
service: my-instance
metrics:
level: detailed
address: 0.0.0.0:8888
```

## Other Information

### Configuration Environment Variables
Expand Down