Skip to content

Commit 9ce1f5a

Browse files
Preserve the record ID in forwarded log records.
1 parent 535c3f0 commit 9ce1f5a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

api/logstream/logstream.go

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ func (ls *LogStream) Close() error {
121121
// See the counterpart in apiserver/logstream.go.
122122
func recordFromAPI(apiRec params.LogStreamRecord, controllerUUID string) (logfwd.Record, error) {
123123
rec := logfwd.Record{
124+
ID: apiRec.ID,
124125
Timestamp: apiRec.Timestamp,
125126
Message: apiRec.Message,
126127
}

logfwd/record.go

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import (
1515

1616
// Record holds all the information for a single log record.
1717
type Record struct {
18+
// ID identifies the record and its position in a sequence
19+
// of records.
20+
ID int64
21+
1822
// Origin describes what created the record.
1923
Origin Origin
2024

0 commit comments

Comments
 (0)