Skip to content

Commit a7bcf0d

Browse files
committed
monitoring
1 parent 4a7b8f2 commit a7bcf0d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

InfluxDbStorage.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ public function pushConsumedMessageStats(ConsumedMessageStats $stats): void
139139

140140
public function pushSentMessageStats(SentMessageStats $stats): void
141141
{
142-
$tags = [];
142+
$tags = [
143+
'queue' => $stats->getQueue(),
144+
];
145+
143146
$properties = $stats->getProperties();
144147

145148
if (false === empty($properties[Config::TOPIC])) {

SentMessageStats.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ class SentMessageStats implements Stats
1111
*/
1212
protected $timestampMs;
1313

14+
/**
15+
* @var string
16+
*/
17+
protected $queue;
18+
1419
/**
1520
* @var array
1621
*/
@@ -23,10 +28,12 @@ class SentMessageStats implements Stats
2328

2429
public function __construct(
2530
int $timestampMs,
31+
string $queue,
2632
array $headers,
2733
array $properties
2834
) {
2935
$this->timestampMs = $timestampMs;
36+
$this->queue = $queue;
3037
$this->headers = $headers;
3138
$this->properties = $properties;
3239
}
@@ -36,6 +43,11 @@ public function getTimestampMs(): int
3643
return $this->timestampMs;
3744
}
3845

46+
public function getQueue(): string
47+
{
48+
return $this->queue;
49+
}
50+
3951
public function getHeaders(): array
4052
{
4153
return $this->headers;

0 commit comments

Comments
 (0)