Closed cwegener closed 5 months ago
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
I believe this behavior has been in place for about 3 months. That said, I agree this shouldn't be an error message. I've opened https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/26526 to reduce this to a warning log.
I believe this behavior has been in place for about 3 months.
I didn't get a chance to bisect the issue yet. A bit strange that I see the difference when going from 0.82.0 to 0.84.0, considering that the change you've identified was introduced in ~0.81.0~ ~0.80.0~ 0.81.0
I've opened https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/26526 to reduce this to a warning log
Warning sounds good, considering that it has been a warning before.
Lastly, which part determines the 1 second interval that I'm seeing? I couldn't spot anything in the filelog receiver docs that points to something happening every 1 second.
Hello @djaglowski We've seen this issue happening on our side too when upgrading from v0.76 to v0.84. Reducing to warning doesn't really works for us as we are interested in warning logs and also some of our filelog receivers check for files that are optional, appearing later etc.. Shouldn't this be an option instead? E.g. warn/error if files are required to be present, and lower severity if those files are optional? WDYT?
My opinion is that we should not add configuration at the component level to control log levels. This will lead to a lot of complexity and inconsistency across the codebase. I think we can try to choose a reasonable log level but ultimately some folks will need to manipulate or filter their telemetry to meet their needs. Info level may be reasonable, but the downside there is that new users will often miss the immediate feedback they need to get started using the collector.
warn/error if files are required to be present
I don't think the receiver should apply strong expectations in any case. There are too many legitimate situations where log files may not be present, temporarily or otherwise. Again, we can generate the telemetry but users may need to process/react to the telemetry according to their needs.
I can understand from the collector side that it may not make sense to introduce|maintain this complexity. We'll drop those on our side then, thanks!
We've seen this issue happening on our side too when upgrading from v0.76 to v0.84. Reducing to warning doesn't really works for us as we are interested in warning logs and also some of our filelog receivers check for files that are optional, appearing later etc.. Shouldn't this be an option instead? E.g. warn/error if files are required to be present, and lower severity if those files are optional? WDYT?
I think that the original design actually was catering for this use case and it has now changed. Not 100% sure.
This is the part in the design: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/28bce8a463a87bfdd3be14f716d95f025cf2c699/pkg/stanza/fileconsumer/design.md?plain=1#L89
@djaglowski Does the design doc need changing in order to reflect the changed behaviour?
@cwegener, I believe the statement is still accurate. We print a warning if no files are found during startup.
@cwegener, I believe the statement is still accurate. We print a warning if no files are found during startup.
I thought that the warning is now printed on every poll cycle instead of just the first poll cycle. I'll have a quick check to verify.
@djaglowski we see this log occurring again on each poll cycle (instead of initial one only) since we've upgraded from v0.94 to v0.96; should we open another issue?
Thanks for reporting @kevinnoel-be. I'll look into it.
I opened https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32011 to fix it. Apologies, this somehow snuck in with https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/30728.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers
. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Closed by #32011
Component(s)
pkg/stanza, receiver/filelog
What happened?
Description
After upgrading the OTel Collector from 0.82.0 to 0.84.0, the
filelog
receiver started producing error messages when the matching rules result in NO files being matched for consuming.Steps to Reproduce
Run OTel Collector 0.82.0 with above config
Run OTel Collector 0.84.0 with above config
Compare results
Expected Result
No errors logged that zero files were matched. And 1 warning logged during startup that zero files were matched.
Actual Result
1 error per second logged that zero files were matched.
Collector version
v0.84.0
Environment information
Environment
OS: "Ubuntu 22.04", "Windows Server 2022", "Archlinux" Compiler(if manually compiled): go 1.21.0
OpenTelemetry Collector configuration
Log output
Additional context
No response