Skip to content

Commit

Permalink
[exporter/debug] change default verbosity from normal to basic (#…
Browse files Browse the repository at this point in the history
…8846)

This change has currently no effect, as `basic` and `normal` verbosity
share the same behavior. This might change in the future though, with
the `normal` verbosity being more verbose than it currently is (see
#7806).
This is why we are changing the default to `basic`, which is expected to
stay at the current level of verbosity (one line per batch).

**Link to tracking Issue:**

- #8844
  • Loading branch information
andrzej-stencel authored Nov 15, 2023
1 parent 8c6cf78 commit f96d155
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
25 changes: 25 additions & 0 deletions .chloggen/debug-exporter-default-verbosity-basic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: exporter/debug

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Change default `verbosity` from `normal` to `basic`

# One or more tracking issues or pull requests related to the change
issues: [8844]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: This change has currently no effect, as `basic` and `normal` verbosity share the same behavior. This might change in the future though, with the `normal` verbosity being more verbose than it currently is (see https://github.com/open-telemetry/opentelemetry-collector/issues/7806). This is why we are changing the default to `basic`, which is expected to stay at the current level of verbosity (one line per batch).

# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
16 changes: 8 additions & 8 deletions exporter/debugexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ See also the [Troubleshooting][troubleshooting_docs] document for examples on us

The following settings are optional:

- `verbosity` (default = `normal`): the verbosity of the logging export
- `verbosity` (default = `basic`): the verbosity of the logging export
(detailed|normal|basic). When set to `detailed`, pipeline data is verbosely
logged.
- `sampling_initial` (default = `2`): number of messages initially logged each
Expand All @@ -41,23 +41,23 @@ exporters:
## Verbosity levels
The following subsections describe the output from the exporter depending on the configured verbosity level - `basic`, `normal` and `detailed`.
The default verbosity level is `normal`.
The default verbosity level is `basic`.

### Basic verbosity

With `verbosity: basic`, the exporter's behavior is currently the same as with `verbosity: normal`.
See below for more details.

### Normal verbosity

With `verbosity: normal`, 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.
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.

Here's an example output:

```console
2023-11-10T22:49:03.510-0600 info TracesExporter {"kind": "exporter", "data_type": "traces", "name": "debug", "resource spans": 1, "spans": 2}
```

### Normal verbosity

With `verbosity: normal`, the exporter's behavior is currently the same as with `verbosity: basic`.
See above for more details.

### Detailed verbosity

With `verbosity: detailed`, the exporter outputs all details of every telemetry record, typically writing multiple lines for every telemetry record.
Expand Down
2 changes: 1 addition & 1 deletion exporter/debugexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewFactory() exporter.Factory {

func createDefaultConfig() component.Config {
return &Config{
Verbosity: configtelemetry.LevelNormal,
Verbosity: configtelemetry.LevelBasic,
SamplingInitial: defaultSamplingInitial,
SamplingThereafter: defaultSamplingThereafter,
}
Expand Down

0 comments on commit f96d155

Please sign in to comment.