You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Debug exporter has sampling enabled by default. I don't think this behavior matches the intended usage of the component.
Whenever I use the Debug exporter, it's to see all the information that goes into it. The debug exporter sampling things out is misleading to me.
What version did you use?
v0.97.0
Steps to reproduce
Prepare empty input file input.log
$ rm input.log; touch input.log
Start the collector (in the background, to reuse the console)
$ ./otelcol-contrib-0.97.0-linux_amd64 --config ./config.yaml &
2024-04-09T09:49:11.057+0200 info [email protected]/telemetry.go:97 Serving metrics {"address": ":8888", "level": "Basic"}
2024-04-09T09:49:11.057+0200 info [email protected]/exporter.go:275 Development component. May change in the future. {"kind": "exporter", "data_type": "logs", "name": "debug"}
2024-04-09T09:49:11.059+0200 info [email protected]/service.go:143 Starting otelcol-contrib... {"Version": "0.97.0", "NumCPU": 16}
2024-04-09T09:49:11.059+0200 info extensions/extensions.go:34 Starting extensions...
2024-04-09T09:49:11.059+0200 info adapter/receiver.go:45 Starting stanza receiver {"kind": "receiver", "name": "filelog", "data_type": "logs"}
2024-04-09T09:49:11.059+0200 info [email protected]/service.go:169 Everything is ready. Begin running and processing data.
2024-04-09T09:49:11.059+0200 warn localhostgate/featuregate.go:63 The default endpoints forall serversin components will change to use localhost instead of 0.0.0.0 in a future version. Use the feature gate to preview the new default. {"feature gate ID": "component.UseLocalHostAsDefaultHost"}
$
Add 30 lines to the input.log file, 1 line every 0.1 seconds. This results in 30 lines written to the input.log file across 3 seconds, 10 lines every second.
Note that just adding the exporters.debug.sampling_thereafter: 1 to the Debug exporter's configuration is not enough. I also had to add the service.telemetry.sampling.enabled: false to get the correct result. Confusing!
Additional context
The text was updated successfully, but these errors were encountered:
I considered proposing removing sampling options from the exporter altogether, but ultimately decided against it. I've never used these options, but maybe someone does find them useful? I believe changing the default to not sample is what should satisfy everybody.
#### Description
Disables sampling by default in the Debug exporter.
#### Link to tracking issue
- #9921
#### Testing
No changes.
#### Documentation
Updated component documentation.
sampling is now disabled by default in the exporter.
The other issue is that the collector's internal logger's sampling (configured in service::telemetry::sampling::enabled, enabled by default) can affect the output of the exporter. The workaround for this is to configure the Debug exporter to not use the collector's internal logger with use_internal_logger: false. This feature was added in:
Describe the bug
The Debug exporter has sampling enabled by default. I don't think this behavior matches the intended usage of the component.
Whenever I use the Debug exporter, it's to see all the information that goes into it. The debug exporter sampling things out is misleading to me.
What version did you use?
v0.97.0
Steps to reproduce
input.log
$ rm input.log; touch input.log
input.log
file, 1 line every 0.1 seconds. This results in 30 lines written to theinput.log
file across 3 seconds, 10 lines every second.What did you expect to see?
What did you see instead?
What config did you use?
Environment
OS: Ubuntu 23.10
Workaround
I was able to get all 30 entries output by the Debug exporter with the following configuration:
Note that just adding the
exporters.debug.sampling_thereafter: 1
to the Debug exporter's configuration is not enough. I also had to add theservice.telemetry.sampling.enabled: false
to get the correct result. Confusing!Additional context
The text was updated successfully, but these errors were encountered: