Skip to content

Commit 4f856c9

Browse files
committed
refactor(dropwatch): always emit memcg_css and netns fields
Drop omitempty from MemcgCssAddr, NetNamespaceCookie, and NetNamespaceInode so every dropwatch event renders these fields with a stable shape. Consumers and ES mappings can rely on the keys being present rather than branching on absence vs zero.
1 parent f3aad7d commit 4f856c9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/types/dropwatch.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ type DropWatchTracing struct {
3434
Comm string `json:"comm"`
3535
Pid uint64 `json:"pid"`
3636
ContainerID string `json:"container_id,omitempty"`
37-
MemcgCssAddr string `json:"memcg_css,omitempty"`
38-
NetNamespaceCookie uint64 `json:"net_namespace_cookie,omitempty"`
39-
NetNamespaceInode uint32 `json:"net_namespace_inode,omitempty"`
37+
MemcgCssAddr string `json:"memcg_css"`
38+
NetNamespaceCookie uint64 `json:"net_namespace_cookie"`
39+
NetNamespaceInode uint32 `json:"net_namespace_inode"`
4040
NetdevName string `json:"netdev_name"`
4141
NetdevIfindex uint32 `json:"netdev_ifindex"`
4242
NetdevQueueMapping uint32 `json:"netdev_queue_mapping"`

0 commit comments

Comments
 (0)