Metrics: Added scrape memory usage
This commit is contained in:
parent
e06affae17
commit
da804fe720
|
@ -135,6 +135,12 @@ class Controller extends BaseController
|
||||||
microtime(true) - $this->request->server->get('REQUEST_TIME_FLOAT', $now),
|
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
|
return $this->response
|
||||||
->withHeader('Content-Type', 'text/plain; version=0.0.4')
|
->withHeader('Content-Type', 'text/plain; version=0.0.4')
|
||||||
->withContent($this->engine->get('/metrics', $data));
|
->withContent($this->engine->get('/metrics', $data));
|
||||||
|
|
Loading…
Reference in New Issue