Skip to content

Commit

Permalink
Use right timestamp for signature events
Browse files Browse the repository at this point in the history
This fixes a bug where the wrong method for retrieving nanoseconds was
used, causing signature events to be discarded.
  • Loading branch information
patrickpichler committed Apr 2, 2024
1 parent 0b16523 commit 9142cee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ebpftracer/signature/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (e *SignatureEngine) handleEvent(event *types.Event) {

e.eventsChan <- &castpb.Event{
EventType: castpb.EventType_EVENT_SIGNATURE,
Timestamp: uint64(time.Now().UTC().Nanosecond()),
Timestamp: uint64(time.Now().UTC().UnixNano()),
ProcessName: string(bytes.TrimRight(event.Context.Comm[:], "\x00")),
Namespace: event.Container.PodNamespace,
PodName: event.Container.PodName,
Expand Down

0 comments on commit 9142cee

Please sign in to comment.