You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PYTHON-5945 Fix four command-span correctness bugs found in review
- db.query.text truncation reused a blind full-string slice, almost
always producing invalid JSON; now truncates oversized field values
first (matching the existing log-message truncation approach), with
the blind slice only as a last-resort safety net.
- explain wraps the real command ({"explain": {"find": ...}}), the
same shape as getMore's indirection, but wasn't handled, so explain
spans silently lost db.collection.name.
- An explicit tracing.query_text_max_length=0 (meant to disable
db.query.text) was indistinguishable from "not configured" and got
silently overridden by the environment variable. The option is now
Optional[int]: unset defers to the environment variable, any
explicit value (including 0) always wins.
- server.port was set to None for Unix domain socket connections
(address[1] is None for .sock addresses), an invalid attribute type
that the OTel SDK would warn about and drop; the attribute is now
omitted instead. Also corrected _ConnectionTelemetryInfo.address's
type to match reality (_Address, not a non-optional int port).
0 commit comments