Skip to content

[receiver/filelog]: Log glob IO errors #23768

Closed
@BinaryFissionGames

Description

@BinaryFissionGames

Component(s)

receiver/filelog

Describe the issue you're reporting

Currently, we are globbing and ignoring any IO errors, which is the default behavior of the glob library we are using. However, this means that any errors that are gotten here are swallowed silently by the receiver.

https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/c15794f8b3ad8bdf1bbf5abfba8486df4ad1b7c9/pkg/stanza/fileconsumer/finder.go#L21C2-L21C2

Instead, I think it would be ideal if we used the WithFailOnIOErrors option (https://pkg.go.dev/github.com/bmatcuk/doublestar/v4#WithFailOnIOErrors) initially, and if fails, log a warning (or maybe even just a debug level log?), and fall back to using the current behavior.

This would help to debug instances where globbing is actually failing (can't access dir because of permissions, for instance), and silently leads to files not being picked up by the receiver.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions