From c4b9cb2fba2200b812e58114d98252f6cf334148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Bal=C4=8Dytis?= Date: Wed, 15 May 2019 23:54:40 +0300 Subject: [PATCH] Send topic and command for consumed messages --- pkg/monitoring/InfluxDbStorage.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/monitoring/InfluxDbStorage.php b/pkg/monitoring/InfluxDbStorage.php index 401d79ddb..ff5f6c3b0 100644 --- a/pkg/monitoring/InfluxDbStorage.php +++ b/pkg/monitoring/InfluxDbStorage.php @@ -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(),