Specify and test getMore span nesting in the OpenTelemetry spec

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Component/s: Observability
    • None
    • Needed
    • Hide

      Summary of necessary driver changes

      •  

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

      •  

      Context for other referenced/linked tickets

      •  
      Show
      Summary of necessary driver changes   Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed)   Context for other referenced/linked tickets  
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-6426 Blocked
      CXX-3555 Blocked
      CSHARP-6188 Blocked
      GODRIVER-4079 Blocked
      JAVA-6282 Blocked
      NODE-7763 Blocked
      PYTHON-5993 In Progress
      PHPLIB-1928 Blocked
      RUBY-3937 Blocked
      RUST-2468 Blocked
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } #scriptField td.willNotDo { background-color: #FF0000; /* Red color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-6426 Blocked CXX-3555 Blocked CSHARP-6188 Blocked GODRIVER-4079 Blocked JAVA-6282 Blocked NODE-7763 Blocked PYTHON-5993 In Progress PHPLIB-1928 Blocked RUBY-3937 Blocked RUST-2468 Blocked

      Summary

      The spec requires each command span to nest under "the corresponding driver operation span", which is unambiguous only while an operation sends a single command. For a cursor it never says which operation span a getMore belongs to: one span covering the cursor's whole lifetime, or a fresh one per iteration. Both readings pass the current suite, since no fixture exercises getMore, batchSize or a tailable cursor, and db.mongodb.cursor_id is asserted absent in all 25 places it appears.

      Motivation

      Who is the affected end user?

      Driver teams implementing the spec, and application developers reading the traces.

      How does this affect the end user?

      Drivers can pick either nesting and still pass, so trace shapes for a very common operation differ by language with no way to tell which is correct.

      How likely is it that this problem or use case will occur?

      Main path. Any query returning more than one batch sends a getMore.

      If the problem does occur, what are the consequences and how severe are they?

      Moderate. No outage or data risk, but cross-language traces become hard to compare, and a driver that guessed differently needs a breaking change to its span structure later.

      Is this issue urgent?

      No, but it is cheaper to settle before more drivers ship.

      Is this ticket only for tests?

      No. It needs a spec clarification too, since a test alone would make one reading of ambiguous prose normative.

      Acceptance Criteria

      • The spec states which operation span a getMore nests under, and what is expected for cursors that are never exhausted, where a lifetime-scoped span would never end.
      • A test covers a query returning more than one batch and asserts the getMore nesting, with extra spans not ignored so an unintended operation span per batch fails.
      • A test asserts db.mongodb.cursor_id is present, on both a cursor-creating command and one that uses an existing cursor.

            Assignee:
            Steve Silvester
            Reporter:
            Steve Silvester
            Nabil Hachicha Nabil Hachicha
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: