Open ojcm opened 10 months ago
It seems like the code around tracking message IDs has evolved in such a way to completely break this metric. In both places this metric is observed (1, 2) it happens immediately after initialisation of a trackingMessageID
without setting the receivedTime
field. This has two obvious problems.
Firstly, the observation is relying on a field that isn't set, so the operation to get time since the receivedtime will always produce nonsense values. Secondly, because the struct owning that field was only just created, even if it had been set the value would be useless.
I would be happy to raise a PR to fix this, but the intention of the existing code doesn't make any sense to me. Some guidance from maintainers on how this is supposed to work would be really appreciated.
Expected behavior
The
pulsar_client_consumer_processing_time_seconds
metric should contain observations of the time it takes a consumer to process messages.Actual behavior
The observations are wrong. They have values of approximately 8.5e+09 (~269 years).
Steps to reproduce
Create a consumer, ack some messages, check the metrics. e.g.
produces
System configuration
Pulsar version: 2.10 Pulsar client version:v0.11.1