Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/containerwatcher/v2/tracers/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package tracers

import (
"context"
"strconv"

"github.com/inspektor-gadget/inspektor-gadget/pkg/datasource"
gadgetcontext "github.com/inspektor-gadget/inspektor-gadget/pkg/gadget-context"
Expand Down Expand Up @@ -70,7 +69,7 @@ func (ot *OpenTracer) Start(ctx context.Context) error {
)
go func() {
params := map[string]string{
"operator.oci.ebpf.paths": strconv.FormatBool(ot.cfg.EnableFullPathTracing),
"operator.oci.ebpf.paths": "true",
"operator.LocalManager.host": "true", // don't error if container-collection is nil when using local manager
}
err := ot.runtime.RunGadget(ot.gadgetCtx, nil, params)
Expand Down
6 changes: 1 addition & 5 deletions pkg/utils/datasource_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,9 @@ func (e *DatasourceEvent) GetOtherIp() string {
}

func (e *DatasourceEvent) GetPath() string {
if e.FullPathTracing {
return e.GetFullPath()
}
switch e.EventType {
case OpenEventType:
path, _ := e.getFieldAccessor("fname").String(e.Data)
return path
return e.GetFullPath()
default:
logger.L().Warning("GetPath not implemented for event type", helpers.String("eventType", string(e.EventType)))
return ""
Expand Down
6 changes: 3 additions & 3 deletions pkg/utils/struct_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,11 @@ func (e *StructEvent) GetOtherIp() string {
}

func (e *StructEvent) GetPath() string {
if e.FullPathTracing {
return e.GetFullPath()
}
switch e.EventType {
case OpenEventType:
if e.FullPath != "" {
return e.FullPath
}
return e.Path
default:
logger.L().Warning("GetPath not implemented for event type", helpers.String("eventType", string(e.EventType)))
Expand Down