You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running with an udplogreceiver -> batch processor -> exporter with very high load for long periods of time we are seeing an occasional panic (see stack below)
Line 128 calls pLogs.LogRecordCount after line 124 calls r.consumer.ConsumeLogs.
Issue 1: If the consumer is mutating the pLogs asynchronously while LogRecordCount is looping, you can get a panic.
Issue 2: If pLogs is modified synchronously in ConsumeLogs, the count could be wrong (assuming that the incoming count is what is desired)
Proposed solution:
I think the count should be taken before ConsumeLogs is called and saved in a local var for EndLogsOp to use later.
Component(s)
pkg/stanza
What happened?
Description
When running with an udplogreceiver -> batch processor -> exporter with very high load for long periods of time we are seeing an occasional panic (see stack below)
I believe the source of the problem is here:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/adapter/receiver.go#L128
Line 128 calls pLogs.LogRecordCount after line 124 calls r.consumer.ConsumeLogs.
Issue 1: If the consumer is mutating the pLogs asynchronously while LogRecordCount is looping, you can get a panic.
Issue 2: If pLogs is modified synchronously in ConsumeLogs, the count could be wrong (assuming that the incoming count is what is desired)
Proposed solution:
I think the count should be taken before ConsumeLogs is called and saved in a local var for EndLogsOp to use later.
Steps to Reproduce
Expected Result
Actual Result
Collector version
v0.88.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
No response
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: