Skip to content

Commit

Permalink
fixup! feat: send logs to userspace + revamp
Browse files Browse the repository at this point in the history
  • Loading branch information
deansheather committed Apr 12, 2024
1 parent 62a07fb commit e9e00ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bpf/bpf_core_read.h linguist-vendored
bpf/bpf_helper_defs.h linguist-vendored
bpf/bpf_helpers.h linguist-vendored
bpf/handler-bpfeb.o linguist-generated
bpf/handler-bpfel.o linguist-generated
bpf/vmlinux.h linguist-vendored
bpf/bpf_core_read.h linguist-generated=true
bpf/bpf_helper_defs.h linguist-generated=true
bpf/bpf_helpers.h linguist-generated=true
bpf/handler-bpfeb.o linguist-generated=true
bpf/handler-bpfel.o linguist-generated=true
bpf/vmlinux.h linguist-generated=true
3 changes: 3 additions & 0 deletions enterprise/exectrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ func Run(ctx context.Context, log slog.Logger, opts Options) error {
log.Debug(ctx, "starting tracer")
tracer, err := exectrace.New(&exectrace.TracerOpts{
PidNS: pidNS,
LogFn: func(uid, gid, pid uint32, logLine string) {
log.Error(ctx, "tracer error log: "+logLine, slog.F("uid", uid), slog.F("gid", gid), slog.F("pid", pid))
},
})
if err != nil {
return xerrors.Errorf("create tracer: %w", err)
Expand Down

0 comments on commit e9e00ff

Please sign in to comment.