Skip to content

Commit

Permalink
feature(types): add task identifier (#3425)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeldtinoco authored Aug 31, 2023
1 parent 52065e1 commit a02945b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion types/trace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,18 @@ type Event struct {
Syscall string `json:"syscall"`
StackAddresses []uint64 `json:"stackAddresses"`
ContextFlags ContextFlags `json:"contextFlags"`
Args []Argument `json:"args"` // Arguments are ordered according their appearance in the original event
EntityID uint32 `json:"-"` // task unique identifier (*)
Args []Argument `json:"args"` // args are ordered according their appearance in the original event
Metadata *Metadata `json:"metadata,omitempty"`
}

// (*) For an OS task to be uniquely identified, tracee builds a hash consisting of:
//
// u64: task start time (from event context)
// u32: task thread id (from event context)
//
// murmur([]byte) where slice of bytes is a concatenation (not a sum) of the 2 values above.

type Container struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Expand Down

0 comments on commit a02945b

Please sign in to comment.