Skip to content

Commit

Permalink
DDEV-1965 fix labels after hashing key
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Davydenko committed Nov 19, 2024
1 parent 6b77a01 commit eabdcc1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Storage/OctaneCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,14 +408,14 @@ private function collectGauges(): array
'samples' => [],
];
foreach (explode('::', $metric['valueKeys']) as $valueKey) {
$value = $this->gaugeValues->get($valueKey, 'value');
$value = $this->gaugeValues->get($valueKey);
$parts = explode(':', $value['key']);
$labelValues = $parts[2];
$data['samples'][] = [
'name' => $metaData['name'],
'labelNames' => [],
'labelValues' => $this->decodeLabelValues($labelValues),
'value' => $value,
'value' => $value['value'],
];

$this->gaugeValues->del($valueKey);
Expand Down Expand Up @@ -445,14 +445,14 @@ private function collectCounters(): array
'samples' => [],
];
foreach (explode('::', $metric['valueKeys']) as $valueKey) {
$value = $this->сounterValues->get($valueKey, 'value');
$value = $this->сounterValues->get($valueKey);
$parts = explode(':', $value['key']);
$labelValues = $parts[2];
$data['samples'][] = [
'name' => $metaData['name'],
'labelNames' => [],
'labelValues' => $this->decodeLabelValues($labelValues),
'value' => $value,
'value' => $value['value'],
];

$this->сounterValues->del($valueKey);
Expand Down

0 comments on commit eabdcc1

Please sign in to comment.