Skip to content
This repository was archived by the owner on Oct 22, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Prometheus/Storage/APC.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ private function collectCounters()
'help' => $metaData['help'],
'type' => $metaData['type'],
'labelNames' => $metaData['labelNames'],
'samples' => array(),
);
foreach (new \APCUIterator('/^prom:counter:' . $metaData['name'] . ':.*:value/') as $value) {
$parts = explode(':', $value['key']);
Expand Down Expand Up @@ -185,6 +186,7 @@ private function collectGauges()
'help' => $metaData['help'],
'type' => $metaData['type'],
'labelNames' => $metaData['labelNames'],
'samples' => array(),
);
foreach (new \APCUIterator('/^prom:gauge:' . $metaData['name'] . ':.*:value/') as $value) {
$parts = explode(':', $value['key']);
Expand Down Expand Up @@ -216,7 +218,8 @@ private function collectHistograms()
'help' => $metaData['help'],
'type' => $metaData['type'],
'labelNames' => $metaData['labelNames'],
'buckets' => $metaData['buckets']
'buckets' => $metaData['buckets'],
'samples' => array(),
);

// Add the Inf bucket so we can compute it later on
Expand Down
4 changes: 3 additions & 1 deletion src/Prometheus/Storage/InMemory.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ private function collectHistograms()
'help' => $metaData['help'],
'type' => $metaData['type'],
'labelNames' => $metaData['labelNames'],
'buckets' => $metaData['buckets']
'buckets' => $metaData['buckets'],
'samples' => array(),
];

// Add the Inf bucket so we can compute it later on
Expand Down Expand Up @@ -114,6 +115,7 @@ private function internalCollect(array $metrics)
'help' => $metaData['help'],
'type' => $metaData['type'],
'labelNames' => $metaData['labelNames'],
'samples' => array(),
];
foreach ($metric['samples'] as $key => $value) {
$parts = explode(':', $key);
Expand Down