Skip to content

Commit 85b16bf

Browse files
authored
[EBPF] gpu: do not try to retrieve container tags if container is empty (#38294)
1 parent 4efc401 commit 85b16bf

File tree

1 file changed

+3
-1
lines changed
  • pkg/collector/corechecks/gpu

1 file changed

+3
-1
lines changed

pkg/collector/corechecks/gpu/gpu.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,9 @@ func (c *Check) getProcessTagsForKey(key model.StatsKey) []string {
306306
fmt.Sprintf("pid:%d", key.PID),
307307
}
308308

309-
tags = append(tags, c.getContainerTags(key.ContainerID)...)
309+
if key.ContainerID != "" {
310+
tags = append(tags, c.getContainerTags(key.ContainerID)...)
311+
}
310312

311313
return tags
312314
}

0 commit comments

Comments
 (0)