ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Observability
    • None
    • Hide

      DRIVERS-3617:
      Summary of necessary driver changes

      • Add `error.type` (string) to command spans: MUST set it when the command fails, MUST NOT set it when the command succeeds, and SHOULD keep the cardinality of values low.
      • Value: SHOULD match `db.response.status_code` when the command failed with a server error. Otherwise, SHOULD be the name of the exception class associated with that command's failure, whether or not the operation ultimately raises it to the application (a retry of the same operation may still succeed).
      • Operation spans: MUST NOT carry `error.type` when the operation succeeds, even if a command within it failed. MUST carry it when the operation itself fails; the value SHOULD be the name of the exception class raised to the application, matching the span's `exception.type`.

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      • Spec merge commit: https://github.com/mongodb/specifications/commit/9cfe388c7d2ce1e02b24b53606e97ce7b73ebb7d (PR mongodb/specifications#1974)
      • New unified fixture source/open-telemetry/tests/operation/error_type.yml (+ generated error_type.json) covering: a server error, a connection failure falling back to the class name, a successful command, a failed retried command whose retry succeeds, and a failed retried non-server command whose exception never reaches the application.
      • New prose tests 5 and 6 in source/open-telemetry/tests/README.md (former tests 5-7 renumbered to 7-9), asserting `error.type` equals `exception.type` where the unified fixture cannot compare two observed attributes.
      • Python POC: https://github.com/mongodb/mongo-python-driver/pull/3000 (PYTHON-6045).

      Context for other referenced/linked tickets

      • Purely additive to other tickets in the Client Side Tracing epic.
      Show
      DRIVERS-3617 : Summary of necessary driver changes Add `error.type` (string) to command spans: MUST set it when the command fails, MUST NOT set it when the command succeeds, and SHOULD keep the cardinality of values low. Value: SHOULD match `db.response.status_code` when the command failed with a server error. Otherwise, SHOULD be the name of the exception class associated with that command's failure, whether or not the operation ultimately raises it to the application (a retry of the same operation may still succeed). Operation spans: MUST NOT carry `error.type` when the operation succeeds, even if a command within it failed. MUST carry it when the operation itself fails; the value SHOULD be the name of the exception class raised to the application, matching the span's `exception.type`. Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed) Spec merge commit: https://github.com/mongodb/specifications/commit/9cfe388c7d2ce1e02b24b53606e97ce7b73ebb7d (PR mongodb/specifications#1974) New unified fixture source/open-telemetry/tests/operation/error_type.yml (+ generated error_type.json) covering: a server error, a connection failure falling back to the class name, a successful command, a failed retried command whose retry succeeds, and a failed retried non-server command whose exception never reaches the application. New prose tests 5 and 6 in source/open-telemetry/tests/README.md (former tests 5-7 renumbered to 7-9), asserting `error.type` equals `exception.type` where the unified fixture cannot compare two observed attributes. Python POC: https://github.com/mongodb/mongo-python-driver/pull/3000 ( PYTHON-6045 ). Context for other referenced/linked tickets Purely additive to other tickets in the Client Side Tracing epic.
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This ticket was split from DRIVERS-3617, please see that ticket for a detailed description.

            Assignee:
            Unassigned
            Reporter:
            TPM Jira Automations Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: