Skip to content

Commit

Permalink
[APM] Show accurate metrics for containerized applications (#76768) (#…
Browse files Browse the repository at this point in the history
…77785)

* 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>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
cauemarcondes and elasticmachine authored Sep 18, 2020
1 parent 5242103 commit 9da19e8
Show file tree
Hide file tree
Showing 9 changed files with 4,879 additions and 76 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions x-pack/plugins/apm/common/elasticsearch_fieldnames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export const METRIC_SYSTEM_FREE_MEMORY = 'system.memory.actual.free';
export const METRIC_SYSTEM_TOTAL_MEMORY = 'system.memory.total';
export const METRIC_SYSTEM_CPU_PERCENT = 'system.cpu.total.norm.pct';
export const METRIC_PROCESS_CPU_PERCENT = 'system.process.cpu.total.norm.pct';
export const METRIC_CGROUP_MEMORY_LIMIT_BYTES =
'system.process.cgroup.memory.mem.limit.bytes';
export const METRIC_CGROUP_MEMORY_USAGE_BYTES =
'system.process.cgroup.memory.mem.usage.bytes';

export const METRIC_JAVA_HEAP_MEMORY_MAX = 'jvm.memory.heap.max';
export const METRIC_JAVA_HEAP_MEMORY_COMMITTED = 'jvm.memory.heap.committed';
Expand Down
Loading

0 comments on commit 9da19e8

Please sign in to comment.