Open
Description
SDK
Python SDK
Description
Looking at the page https://docs.sentry.io/platforms/python/tracing/instrumentation/custom-instrumentation/queues-module/ there is an ambiguity about the unit of messaging.message.receive.latency
.
In the table under "consumer instrumentation", we read:
Data Attribute Type Description messaging.message.receive.latency
number The time in milliseconds that a message awaited processing in queue
(emphasis mine)
However, in the code example, we see
now = datetime.now(timezone.utc) message_time = datetime.fromtimestamp(message["timestamp"], timezone.utc) latency = now - message_time
this computation returns a float
value in seconds.
Looking at my own instrumented system, I think seconds is correct.
Suggested Solution
Change the description the table to read “seconds” instead of “milliseconds”. I would also include that it's a float, not an int.