Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Nov 9, 2023
1 parent e30af98 commit bc22ff3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/Metrics/Metrics.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ private function sendMetric(array $metric): ?EventId
}
});

/**
* @psalm-suppress PossiblyInvalidArgument
*/
$metric['tags'] = array_merge($defaultTags, $metric['tags']);
}

Expand Down
8 changes: 4 additions & 4 deletions tests/Metrics/MetricsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public function testIncr(): void
'type' => 'c',
'value' => 10.0,
'tags' => [
'foo' => 'bar',
'environment' => 'development',
'release' => '1.0.0',
'foo' => 'bar',
],
];

Expand Down Expand Up @@ -73,9 +73,9 @@ public function testDistribution(): void
30,
],
'tags' => [
'foo' => 'bar',
'environment' => 'development',
'release' => '1.0.0',
'foo' => 'bar',
],
];

Expand Down Expand Up @@ -118,9 +118,9 @@ public function testSet(): void
30,
],
'tags' => [
'foo' => 'bar',
'environment' => 'development',
'release' => '1.0.0',
'foo' => 'bar',
],
];

Expand Down Expand Up @@ -159,9 +159,9 @@ public function testGauge(): void
'type' => 'g',
'value' => 10.0,
'tags' => [
'foo' => 'bar',
'environment' => 'development',
'release' => '1.0.0',
'foo' => 'bar',
],
];

Expand Down

0 comments on commit bc22ff3

Please sign in to comment.