-
Notifications
You must be signed in to change notification settings - Fork 2.8k
When using the ReplayFIle
option in the otlpjsonfilereceiver, we get spammy logs
#39855
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
Labels
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I'll send a PR with my suggestion: skip this log line if the I'm curious if there are other ideas though - muting certain errors seems like a useful ability across many components |
ridwanmsharif
added a commit
to ridwanmsharif/opentelemetry-collector-contrib
that referenced
this issue
May 5, 2025
ridwanmsharif
added a commit
to ridwanmsharif/opentelemetry-collector-contrib
that referenced
this issue
May 5, 2025
…is used Fixes open-telemetry#39855 Signed-off-by: Ridwan Sharif <[email protected]>
dragonlord93
pushed a commit
to dragonlord93/opentelemetry-collector-contrib
that referenced
this issue
May 23, 2025
…is used (open-telemetry#39861) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Add to the interface to be able to identify which tracker is being used. Also mute the log when no state is tracked. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#39855 Signed-off-by: Ridwan Sharif <[email protected]> Co-authored-by: Daniel Jaglowski <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component(s)
pkg/stanza/fileconsumer
Is your feature request related to a problem? Please describe.
Specifically this log:
opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver/file.go
Line 44 in 26dd5a6
Describe the solution you'd like
I believe this is happening because when the
ReplayFile
option is used, the fileconsumer uses the noStateTracker file tracker:opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker/tracker.go
Line 143 in 26dd5a6
And this results in a new reader created each time a scrape is done:
opentelemetry-collector-contrib/pkg/stanza/fileconsumer/file.go
Line 266 in 26dd5a6
To fix this, maybe we check for the tracker here before logging this log line.
Describe alternatives you've considered
Alternative 1: Remove this log line
Alternative 2: Allow the otlpjsonfilereceiver mute some errors
Additional context
No response
The text was updated successfully, but these errors were encountered: