Skip to content

Commit

Permalink
[receiver/cloudfoundryreceiver] Set the observed time of the envelope…
Browse files Browse the repository at this point in the history
… to now, instead of when the receiver starts

Co-authored-by: Jose Riguera <jose.riguera@springer.com>
  • Loading branch information
CemDK and jriguera committed May 13, 2024
1 parent b63ab5c commit 05c6974
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion receiver/cloudfoundryreceiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,10 @@ func (cfr *cloudFoundryReceiver) streamLogs(
logs := plog.NewLogs()
libraryLogs := createLibraryLogsSlice(logs)

observedTime := time.Now()
for _, envelope := range envelopes {
if envelope != nil {
convertEnvelopeToLogs(envelope, libraryLogs, cfr.receiverStartTime)
convertEnvelopeToLogs(envelope, libraryLogs, observedTime)
}
}

Expand Down

0 comments on commit 05c6974

Please sign in to comment.