Skip to content

[chore] [exporter/debug] docs: add docs on generating example output #12883

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

Merged
merged 2 commits into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions exporter/debugexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ See also the [Troubleshooting][troubleshooting_docs] document for examples on us

The following settings are optional:

- `verbosity` (default = `basic`): the verbosity of the debug exporter
(detailed|normal|basic). When set to `detailed`, pipeline data is verbosely
logged.
- `verbosity` (default = `basic`): the verbosity of the debug exporter: `basic`, `normal` or `detailed`.
See [Verbosity levels](#verbosity-levels) below for more information.
- `sampling_initial` (default = `2`): number of messages initially logged each
second.
- `sampling_thereafter` (default = `1`): sampling rate after the initial
Expand All @@ -53,6 +52,8 @@ exporters:
The following subsections describe the output from the exporter depending on the configured verbosity level - `basic`, `normal` and `detailed`.
The default verbosity level is `basic`.

To understand how the below example output was generated, see [Generating example output](./generating-example-output.md).

### Basic verbosity

With `verbosity: basic`, the exporter outputs a single-line summary of received data with a total count of telemetry records for every batch of received logs, metrics or traces.
Expand Down
42 changes: 42 additions & 0 deletions exporter/debugexporter/generating-example-output.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Generating example output

This document describes how to generate the example output used in the [README](./README.md)'s [Verbosity levels](./README.md#verbosity-levels) section.

1. Prepare the configuration of the Collector.

```yaml
exporters:
debug/basic:
verbosity: basic
debug/normal:
verbosity: normal
debug/detailed:
verbosity: detailed

receivers:
otlp:
protocols:
grpc:

service:
pipelines:
traces:
exporters:
- debug/basic
- debug/normal
- debug/detailed
receivers:
- otlp
```

2. Run the Collector (download latest version from <https://github.com/open-telemetry/opentelemetry-collector-releases/releases>).

```console
otelcol --config config.yaml
```

3. Run the `telemetrygen` tool (install latest version with `go install github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen@latest`).

```console
telemetrygen traces --otlp-insecure
```
Loading