This is an automated email from the ASF dual-hosted git repository.
liuhan pushed a commit to branch tmp_disable_reading
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git
The following commit(s) were added to refs/heads/tmp_disable_reading by this
push:
new 414a9f3 fix missing kernel logs
414a9f3 is described below
commit 414a9f39cb2f911dba01201ff480819771e65bf3
Author: mrproliu <[email protected]>
AuthorDate: Sun Dec 22 15:45:16 2024 +0800
fix missing kernel logs
---
pkg/accesslog/runner.go | 2 +-
pkg/accesslog/sender/logs.go | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/pkg/accesslog/runner.go b/pkg/accesslog/runner.go
index 95718bb..bc1a6ad 100644
--- a/pkg/accesslog/runner.go
+++ b/pkg/accesslog/runner.go
@@ -165,7 +165,7 @@ func (r *Runner) buildProtocolLogs(protocols chan
*common.ProtocolLog, batch *se
conID, randomID, connection != nil,
delay)
}
if connection != nil && len(kernelLogs) > 0 &&
protocolLogs != nil {
- batch.AppendProtocolLog(connection,
protocolLogs)
+ batch.AppendProtocolLog(connection, kernelLogs,
protocolLogs)
} else if delay {
delayAppends = append(delayAppends, protocolLog)
}
diff --git a/pkg/accesslog/sender/logs.go b/pkg/accesslog/sender/logs.go
index 246adaf..95f2710 100644
--- a/pkg/accesslog/sender/logs.go
+++ b/pkg/accesslog/sender/logs.go
@@ -49,7 +49,7 @@ func (l *BatchLogs) AppendKernelLog(connection
*common.ConnectionInfo, log *v3.A
logs.kernels = append(logs.kernels, log)
}
-func (l *BatchLogs) AppendProtocolLog(connection *common.ConnectionInfo, log
*v3.AccessLogProtocolLogs) {
+func (l *BatchLogs) AppendProtocolLog(connection *common.ConnectionInfo,
kernels []*v3.AccessLogKernelLog, protocols *v3.AccessLogProtocolLogs) {
logs, ok := l.logs[connection]
if !ok {
logs = newConnectionLogs()
@@ -57,7 +57,8 @@ func (l *BatchLogs) AppendProtocolLog(connection
*common.ConnectionInfo, log *v3
}
logs.protocols = append(logs.protocols, &ConnectionProtocolLog{
- protocol: log,
+ kernels: kernels,
+ protocol: protocols,
})
}