File tree 3 files changed +19
-6
lines changed
3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public function onPostSend(PostSend $context): void
39
39
$ stats = new SentMessageStats (
40
40
$ timestampMs ,
41
41
$ destination ,
42
+ $ context ->getTransportDestination () instanceof Topic,
42
43
$ context ->getTransportMessage ()->getMessageId (),
43
44
$ context ->getTransportMessage ()->getCorrelationId (),
44
45
$ context ->getTransportMessage ()->getHeaders (),
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ public function pushConsumedMessageStats(ConsumedMessageStats $stats): void
141
141
public function pushSentMessageStats (SentMessageStats $ stats ): void
142
142
{
143
143
$ tags = [
144
- 'queue ' => $ stats ->getQueue (),
144
+ 'destination ' => $ stats ->getDestination (),
145
145
];
146
146
147
147
$ properties = $ stats ->getProperties ();
Original file line number Diff line number Diff line change @@ -24,7 +24,12 @@ class SentMessageStats implements Stats
24
24
/**
25
25
* @var string
26
26
*/
27
- protected $ queue ;
27
+ protected $ destination ;
28
+
29
+ /**
30
+ * @var bool
31
+ */
32
+ protected $ isTopic ;
28
33
29
34
/**
30
35
* @var array
@@ -38,14 +43,16 @@ class SentMessageStats implements Stats
38
43
39
44
public function __construct (
40
45
int $ timestampMs ,
41
- string $ queue ,
46
+ string $ destination ,
47
+ bool $ isTopic ,
42
48
?string $ messageId ,
43
49
?string $ correlationId ,
44
50
array $ headers ,
45
51
array $ properties
46
52
) {
47
53
$ this ->timestampMs = $ timestampMs ;
48
- $ this ->queue = $ queue ;
54
+ $ this ->destination = $ destination ;
55
+ $ this ->isTopic = $ isTopic ;
49
56
$ this ->messageId = $ messageId ;
50
57
$ this ->correlationId = $ correlationId ;
51
58
$ this ->headers = $ headers ;
@@ -57,9 +64,14 @@ public function getTimestampMs(): int
57
64
return $ this ->timestampMs ;
58
65
}
59
66
60
- public function getQueue (): string
67
+ public function getDestination (): string
68
+ {
69
+ return $ this ->destination ;
70
+ }
71
+
72
+ public function isTopic (): bool
61
73
{
62
- return $ this ->queue ;
74
+ return $ this ->isTopic ;
63
75
}
64
76
65
77
public function getMessageId (): ?string
You can’t perform that action at this time.
0 commit comments