Skip to content

When using the ReplayFIle option in the otlpjsonfilereceiver, we get spammy logs #39855

Closed
@ridwanmsharif

Description

@ridwanmsharif

Component(s)

pkg/stanza/fileconsumer

Is your feature request related to a problem? Please describe.

Specifically this log:

ReplayFile bool `mapstructure:"replay_file"`

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:

And this results in a new reader created each time a scrape is done:

r, err := m.readerFactory.NewReader(file, fp)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions