diff --git a/src/Controllers/Metrics/Controller.php b/src/Controllers/Metrics/Controller.php index e0824c05..f6ea3967 100644 --- a/src/Controllers/Metrics/Controller.php +++ b/src/Controllers/Metrics/Controller.php @@ -135,6 +135,12 @@ class Controller extends BaseController microtime(true) - $this->request->server->get('REQUEST_TIME_FLOAT', $now), ]; + $data['scrape_memory_bytes'] = [ + 'type' => 'gauge', + 'help' => 'Memory usage of the current request', + memory_get_usage(false), + ]; + return $this->response ->withHeader('Content-Type', 'text/plain; version=0.0.4') ->withContent($this->engine->get('/metrics', $data));