@@ -20,25 +20,15 @@ PyMongo 4.18 brings a number of changes including:
2020 attempts, so consumers can correlate a retried operation's events. As a
2121 result, ``operation_id `` is no longer equal to the per-attempt ``request_id ``
2222 for these operations.
23- - Added optional OpenTelemetry command, operation, and transaction span
24- support, conforming to the
23+ - Added optional OpenTelemetry tracing support, conforming to the
2524 `OpenTelemetry driver specification <https://github.com/mongodb/specifications/blob/master/source/open-telemetry/open-telemetry.md >`_.
26- Enable it with the ``tracing `` :class: `~pymongo.mongo_client.MongoClient `
27- option or the ``OTEL_PYTHON_INSTRUMENTATION_MONGODB_ENABLED `` environment
28- variable. Install the ``opentelemetry-api `` package, or use the
25+ Each public API call produces an operation span, with a span for every
26+ command it sends nested underneath, and a transaction produces a
27+ ``transaction `` span covering the operations it contains. Enable it with the
28+ ``tracing `` :class: `~pymongo.mongo_client.MongoClient ` option or the
29+ ``OTEL_PYTHON_INSTRUMENTATION_MONGODB_ENABLED `` environment variable.
30+ Install the ``opentelemetry-api `` package, or use the
2931 ``pymongo[opentelemetry] `` extra, to enable this feature.
30- An operation span now covers a cursor's entire lifetime, so every
31- ``getMore `` nests under the ``find ``/``aggregate ``/``listIndexes ``/etc.
32- operation that created the cursor instead of starting a sibling span of its
33- own; this also covers command cursors such as the client bulk write results
34- cursor. ``killCursors `` and ``endSessions `` now get operation spans of their
35- own as well, and background monitoring spans no longer attach to a stale
36- parent from client startup. A single ``transaction `` span now covers all
37- retries of one ``with_transaction() `` call or of a directly retried
38- ``commit_transaction() ``. Operation spans also keep their ``db.namespace ``,
39- ``db.collection.name ``, and ``db.operation.summary `` attributes even when
40- the operation fails before any command is sent, such as on a
41- server-selection timeout.
4232- Fixed a potential out-of-bounds read in the C extension when decoding an
4333 array of BSON documents. An embedded document whose declared length exceeds
4434 the bytes remaining in the array now raises
0 commit comments