add_process_metadata
and and_docker_metadata
shouldn't initialize a cgroup reader more than once
#41065
Labels
needs_team
Indicates that the issue/PR needs a Team:* label
Right now both of these processors are calling
processCgroupsPaths
every time they run:beats/libbeat/processors/add_process_metadata/add_process_metadata.go
Line 57 in ee157de
But
processCgroupsPaths
initializes a new reader every time:beats/libbeat/metric/system/cgroup/reader.go
Line 231 in f4da305
NewCgroupReader
is a pretty heavy method and should not be called regularly, this is leading to a considerable amount of wasted CPU cycles.The processors must register a new cgroup reader once at startup.
The text was updated successfully, but these errors were encountered: