Skip to content

Commit 9c90c14

Browse files
[APM] Show accurate metrics for containerized applications (#76768)
* adding cgroup fields * calculate the memory based on the cgroup fields otherwise use the system fields * updating script * adding api tests * using cgroup fields on service map * addressing PR comment * fixing unit test * fixing test * changing api tests to use snapshot * removing inactive_files from calculation * fixing test * refactoring painless script * addressing PR comment * addressing pr comments Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 161a74f commit 9c90c14

File tree

9 files changed

+4879
-76
lines changed

9 files changed

+4879
-76
lines changed

x-pack/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/apm/common/elasticsearch_fieldnames.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ export const METRIC_SYSTEM_FREE_MEMORY = 'system.memory.actual.free';
7979
export const METRIC_SYSTEM_TOTAL_MEMORY = 'system.memory.total';
8080
export const METRIC_SYSTEM_CPU_PERCENT = 'system.cpu.total.norm.pct';
8181
export const METRIC_PROCESS_CPU_PERCENT = 'system.process.cpu.total.norm.pct';
82+
export const METRIC_CGROUP_MEMORY_LIMIT_BYTES =
83+
'system.process.cgroup.memory.mem.limit.bytes';
84+
export const METRIC_CGROUP_MEMORY_USAGE_BYTES =
85+
'system.process.cgroup.memory.mem.usage.bytes';
8286

8387
export const METRIC_JAVA_HEAP_MEMORY_MAX = 'jvm.memory.heap.max';
8488
export const METRIC_JAVA_HEAP_MEMORY_COMMITTED = 'jvm.memory.heap.committed';

0 commit comments

Comments
 (0)