Skip to content

Commit

Permalink
Add cleanup method
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinesh Gurumurthy committed Jul 31, 2023
1 parent a87d916 commit 7483b7d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/orchestrator/orchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

"go.opentelemetry.io/auto/pkg/errors"
"go.opentelemetry.io/auto/pkg/instrumentors"
"go.opentelemetry.io/auto/pkg/instrumentors/bpffs"
"go.opentelemetry.io/auto/pkg/log"
"go.opentelemetry.io/auto/pkg/opentelemetry"
"go.opentelemetry.io/auto/pkg/process"
Expand Down Expand Up @@ -86,6 +87,12 @@ func (i *impl) Run() error {
if m, ok := i.managers[d]; ok {
m.Close()
}
err := bpffs.Cleanup(&process.TargetDetails{
PID: d,
})
if err != nil {
log.Logger.V(0).Error(err, "unable to clean bpffs", "pid", d)
}
delete(i.managers, d)

case p := <-i.processch:
Expand Down

0 comments on commit 7483b7d

Please sign in to comment.