Skip to content

Commit

Permalink
Merge pull request #849 from mariusbalcytis/master
Browse files Browse the repository at this point in the history
Send topic and command for consumed messages
  • Loading branch information
makasim authored May 16, 2019
2 parents 446eb40 + c4b9cb2 commit 0c9f7c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/monitoring/InfluxDbStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@ public function pushConsumedMessageStats(ConsumedMessageStats $stats): void
'status' => $stats->getStatus(),
];

$properties = $stats->getProperties();

if (false === empty($properties[Config::TOPIC])) {
$tags['topic'] = $properties[Config::TOPIC];
}

if (false === empty($properties[Config::COMMAND])) {
$tags['command'] = $properties[Config::COMMAND];
}

$values = [
'receivedAt' => $stats->getReceivedAtMs(),
'processedAt' => $stats->getTimestampMs(),
Expand Down

0 comments on commit 0c9f7c4

Please sign in to comment.