Ambiguous unit in queue latency

Open Beginner friendly
#14,258 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
65/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

Open the Python SDK queue instrumentation page at the linked documentation URL and inspect the consumer instrumentation table alongside its code example. Update the latency description to use seconds and identify the value as a float, then verify the rendered documentation is consistent with the example.

Written by the indexing model from the issue text.

Description

Platform: Python SDKs
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.

Dominant language
MDX
Stars
446
Forks
1.7k
Avg merge
1d 21h
Merged PRs (30d)
312

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-docs

All issues in getsentry/sentry-docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.