Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(types): add task identifier #3425

Merged
merged 1 commit into from Aug 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion types/trace/trace.go
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