Skip to content

Commit 112b889

Browse files
[chore] [exporter/debug] docs: add docs on generating example output (#12883)
1 parent 07f1863 commit 112b889

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

exporter/debugexporter/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ See also the [Troubleshooting][troubleshooting_docs] document for examples on us
2525

2626
The following settings are optional:
2727

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

55+
To understand how the below example output was generated, see [Generating example output](./generating-example-output.md).
56+
5657
### Basic verbosity
5758

5859
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.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Generating example output
2+
3+
This document describes how to generate the example output used in the [README](./README.md)'s [Verbosity levels](./README.md#verbosity-levels) section.
4+
5+
1. Prepare the configuration of the Collector.
6+
7+
```yaml
8+
exporters:
9+
debug/basic:
10+
verbosity: basic
11+
debug/normal:
12+
verbosity: normal
13+
debug/detailed:
14+
verbosity: detailed
15+
16+
receivers:
17+
otlp:
18+
protocols:
19+
grpc:
20+
21+
service:
22+
pipelines:
23+
traces:
24+
exporters:
25+
- debug/basic
26+
- debug/normal
27+
- debug/detailed
28+
receivers:
29+
- otlp
30+
```
31+
32+
2. Run the Collector (download latest version from <https://github.com/open-telemetry/opentelemetry-collector-releases/releases>).
33+
34+
```console
35+
otelcol --config config.yaml
36+
```
37+
38+
3. Run the `telemetrygen` tool (install latest version with `go install github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen@latest`).
39+
40+
```console
41+
telemetrygen traces --otlp-insecure
42+
```

0 commit comments

Comments
 (0)