Skip to content

probabilisticsamplerprocessor logs error events with log level info #39887

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

Open
svenmueller opened this issue May 6, 2025 · 1 comment
Open
Labels
bug Something isn't working needs triage New item requiring triage processor/probabilisticsampler Probabilistic Sampler processor

Comments

@svenmueller
Copy link

Component(s)

processor/probabilisticsampler

What happened?

Description

The probabilisticsamplerprocessor component in the opentelemetry-collector-contrib repository is emitting log events that represent errors (i.e., they include an "error" field with error details) but are logged at the info level instead of the expected error level. This can lead to confusion for operators and makes it more difficult to monitor and alert on actual error conditions, as these events do not appear in error-level log queries (or are hidden when using level: WARN as default log level in production envs).

Steps to Reproduce

  • Deploy the OpenTelemetry Collector with the probabilisticsamplerprocessor enabled in a pipeline.
  • Trigger a scenario that causes the processor to encounter an error (e.g., misconfiguration or invalid input).
  • Observe the logs produced by the collector.

Expected Result

Error events (i.e., log entries that include an "error" field or indicate a failure condition) should be logged at the warn/error level (not as info).

Actual Result

Error events are logged at the info level, even though they represent error conditions. This results in important error information being less visible and not following standard logging practices.

Collector version

0.121.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

Service:
  Telemetry:
    Logs:
      Encoding:  json
      Level:     WARN

Log output

{"level":"info","ts":"2025-05-06T07:17:21.894Z","caller":"[email protected]/sampler_mode.go:491","msg":"traces sampler","otelcol.component.id":"probabilistic_sampler","otelcol.component.kind":"Processor","otelcol.pipeline.id":"traces","otelcol.signal":"traces","error":"invalid syntax"}

Additional context

No response

@svenmueller svenmueller added bug Something isn't working needs triage New item requiring triage labels May 6, 2025
@github-actions github-actions bot added the processor/probabilisticsampler Probabilistic Sampler processor label May 6, 2025
Copy link
Contributor

github-actions bot commented May 6, 2025

Pinging code owners:

  • processor/probabilisticsampler: @jmacd

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage processor/probabilisticsampler Probabilistic Sampler processor
Projects
None yet
Development

No branches or pull requests

1 participant