Context
Post-wave-audit finding #4 (see docs/v1-rc1-post-wave-audit.md).
Every projector ends with the same timestamp fallback:
if t := lr.Timestamp(); t != 0 {
r.Timestamp = t.AsTime()
} else {
r.Timestamp = lr.ObservedTimestamp().AsTime()
}
14 sites in module/processor/patterndetectorprocessor/.
Fix
func recordTimestamp(lr plog.LogRecord) time.Time {
if t := lr.Timestamp(); t != 0 {
return t.AsTime()
}
return lr.ObservedTimestamp().AsTime()
}
Same file as the k8s helper (#3). Land them together.
Acceptance
- One-liner per projector replaces the four-line block.
- Test covers
Timestamp == 0, Timestamp != 0, ObservedTimestamp == 0 (returns zero time).
Bundle with #3 in a single refactor PR.
Context
Post-wave-audit finding #4 (see
docs/v1-rc1-post-wave-audit.md).Every projector ends with the same timestamp fallback:
14 sites in
module/processor/patterndetectorprocessor/.Fix
Same file as the k8s helper (#3). Land them together.
Acceptance
Timestamp == 0,Timestamp != 0,ObservedTimestamp == 0(returns zero time).Bundle with #3 in a single refactor PR.