Revert streamed spans and stream mode docs changes - #18746
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1a61eb6. Configure here.
| span.set_data("messaging.message.body.size", len(message["body"].encode("utf-8"))) | ||
| span.set_data("messaging.message.receive.latency", latency.total_seconds() * 1000) | ||
| span.set_data("messaging.message.body.size", message["body"]) | ||
| span.set_data("messaging.message.receive.latency", latency) |
There was a problem hiding this comment.
Wrong queue span attribute values
Medium Severity
The consumer example sets messaging.message.body.size to the message body itself and messaging.message.receive.latency to a timedelta, but those attributes expect a byte size and milliseconds. The producer example and the attribute table in the same page already document the correct shapes, so anyone copying this will send invalid queue metrics.
Reviewed by Cursor Bugbot for commit 1a61eb6. Configure here.
|
|
||
| span.set_data("http.response.status_code", response.status_code) | ||
| span.set_data("http.response_content_length", response.headers.get("content-length")) | ||
| span.set_data("http.response_content_length", response.headers["content-length"]) |
There was a problem hiding this comment.
Unsafe content-length header access
Low Severity
The restored requests example reads response.headers["content-length"] directly. Many responses omit that header, so the sample raises KeyError before the span can finish. The pre-revert version used a safe .get() check.
Reviewed by Cursor Bugbot for commit 1a61eb6. Configure here.


This reverts the following commits: