Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion async_processor/prometheus_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
+ list(range(750, 5250, 250)) # 18
+ list(range(5500, 10500, 500)) # 10
+ list(range(11000, 16000, 1000)) # 5
+ list(range(16000, 35000, 5000)), # 4
+ list(range(16000, 36000, 5000)), # 4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Ineffective upper-bound update in histogram buckets.

The change from range(16000, 35000, 5000) to range(16000, 36000, 5000) does not actually include 36000, since Python’s range excludes the stop value. The resulting bucket list is still [16000, 21000, 26000, 31000], so the intended extension isn’t applied. To include a boundary at 36000, adjust the stop to 36001 or append it explicitly. For example:

-    + list(range(16000, 36000, 5000)),  # 4
+    + list(range(16000, 36001, 5000)),  # 5
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
+ list(range(16000, 36000, 5000)), # 4
- list(range(16000, 36000, 5000)), # 4
+ list(range(16000, 36001, 5000)), # 5
🤖 Prompt for AI Agents
In async_processor/prometheus_metrics.py at line 41, the range used for
histogram buckets ends at 36000 but does not include it because Python's range
excludes the stop value. To fix this, change the stop value from 36000 to 36001
or explicitly append 36000 to the list to ensure the upper bound is included in
the buckets.

)

MESSAGE_INPUT_LATENCY = Gauge(
Expand Down
Loading