Skip to content

RUBY-4015 Take server_connection_id from the command's own connection - #3129

Merged
comandeo-mongo merged 1 commit into
mongodb:masterfrom
comandeo-mongo:4015-otel-server-connection-id
Nov 9, 2026
Merged

comandeo-mongo merged 1 commit into
mongodb:masterfrom
comandeo-mongo:4015-otel-server-connection-id

Conversation

@comandeo-mongo

Copy link
Copy Markdown
Contributor

Command spans took db.mongodb.server_connection_id from the server description. Every new connection's handshake can replace that description, so it holds the id of whichever connection connected last, not the one that ran the command. With two pooled connections one of them reported the other's id. This uses the connection's own description, as command monitoring already does.

Jira: https://jira.mongodb.org/browse/RUBY-4015

Command spans read db.mongodb.server_connection_id from the server
description. Every new connection's handshake can replace that
description, so it holds the id of whichever connection handshook last,
not the one the command ran on. Use the connection's own description,
as command monitoring does.
@comandeo-mongo
comandeo-mongo marked this pull request as ready for review November 5, 2026 09:24
@comandeo-mongo
comandeo-mongo requested a review from a team as a code owner November 5, 2026 09:24
@comandeo-mongo
comandeo-mongo requested a review from jamis November 5, 2026 09:24
@comandeo-mongo
comandeo-mongo merged commit 8424001 into mongodb:master Nov 9, 2026
241 checks passed
@comandeo-mongo
comandeo-mongo deleted the 4015-otel-server-connection-id branch November 9, 2026 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants