-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[processor/logstransformprocessor] Processor hangs waiting for logs that were filtered out #15378
Comments
Pinging code owners: @djaglowski @dehaansa. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@djaglowski We've done a bit of digging and I thought it was the main select statement in the select {
case <-doneChan:
ltp.logger.Debug("loop stopped")
return ld, errors.New("processor interrupted")
case output, ok := <-ltp.outputChannel:
if !ok {
return ld, errors.New("processor encountered an issue receiving logs from stanza operators pipeline")
}
if output.err != nil {
return ld, err
}
return output.logs, nil
} If everything is filtered out the |
@djaglowski @cpheps, I made my own investigation and the flow for processor is more less the following:
The issue is that I'm not too familiar with the design intentions, but based on what I see I think that |
Thank for the detailed investigation @sumo-drosiek.
I think currently we are not backpropagating anything between operators, but it makes sense to me that we should, either a boolean or checkable error. The other option would be to emit |
@djaglowski I am making an attempt to fix it in #16452. Please make conceptional review of the approach I think checkable error require less changes and make it more readable for operators which are not a writers, but on the other way its overloading the error |
I think your assessment and approach look reasonable to me. The signature returning Given the unusual signature, I think it will be especially important to include a decent comment to explain how to interpret each value. My understanding is:
|
I agree with that. In addition I'm going to document |
Perhaps we should return the number of logs emitted. |
I changed signature to return number of entries and error eventually. PR is ready for review |
Resolved by #17079 |
What happened?
Description
When using the
logstransformprocessor
to filter logs, the loop inprocessLogs
will eventually hang waiting for the filtered out logs.processLogs
is blocking, so the pipeline is blocked there.Steps to Reproduce
Using the supplied config:
/tmp/test.log
at a constant rate.Expected Result
Logs would continue to flow despite some records being dropped by the processor.
Actual Result
All pipelines using the
filelog
receiver stall once theprocessLogs
method gets stuck waiting on the channel. The exporter doesn't send any logs despite new records being written constantly.Collector version
c62e003
Environment information
Environment
OS: Ubuntu 20.04, macOS 12.6
Compiler(if manually compiled): go 1.18.7
OpenTelemetry Collector configuration
Log output
The text was updated successfully, but these errors were encountered: