Skip to content

Commit

Permalink
Merge pull request #4 from dpfaffenbauer/patch-1
Browse files Browse the repository at this point in the history
Bus Name can contain - causing invalid label for prometheus
  • Loading branch information
fjogeleit authored Dec 19, 2023
2 parents d2c4322 + bf1ca73 commit b953bbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PrometheusMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function handle(Envelope $envelope, StackInterface $stack): Envelope
$stamp = $envelope->last(BusNameStamp::class);

if (true === $stamp instanceof BusNameStamp) {
$busName = str_replace('.', '_', $stamp->getBusName());
$busName = str_replace(['.', '-'], '_', $stamp->getBusName());
}

$counter = $this->getCounter(
Expand Down

0 comments on commit b953bbb

Please sign in to comment.