apm-agent-php icon indicating copy to clipboard operation
apm-agent-php copied to clipboard

Collect system metrics (CPU and memory)

Open SergeyKleyman opened this issue 6 years ago • 3 comments

SergeyKleyman avatar Jan 16 '20 08:01 SergeyKleyman

Lets have this disabled by default initially and add a configuration flag for enabling.

graphaelli avatar Jun 08 '20 11:06 graphaelli

Hi, can I ask what the current status of this is? Has it been implemented but is missing from the docs? Implemented but behind a flag? Or not yet implemented?

dpbricher avatar Jul 12 '21 11:07 dpbricher

I could well be wrong - but the omission of this functionality appears to be causing errors to be thrown in a vanilla copy of APM as of version 8.1.

Browsing to a particular PHP service in the UI triggers an API call to get the "instances" list (get_service_instances_system_metric_statistics), which then fails with the following error as the memory usage metric is not present and therefore cannot be calculated.

 {
    "type": "script_exception",
    "reason": "link error",
    "script_stack": [
         "doc['system.memory.actual.free']",
         "     ^---- HERE"
    ],
    "script": "1 - doc['system.memory.actual.free'] / doc['system.memory.total']",
    "lang": "expression"
}

This presents as a large error popup over part of the UI which is a bit frustrating in day to day use.

Would be great to see this functionality prioritised if indeed it is the cause of the problem.

mattrenner avatar Mar 17 '22 20:03 mattrenner