ExportXMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Critical - P2
    • 3.7.0
    • Affects Version/s: None
    • Component/s: Diagnostics
    • Hide

      DRIVERS-719:
      Summary of necessary driver changes

      •  Implement the OpenTelemetry spec (source/open-telemetry/open-telemetry.md) at current master. Steps 1 to 4 below are already merged into the spec, so reading current master gives you the corrected text without applying each ticket's diff; step 5 (DRIVERS-3625) is not merged yet. The ticket list is the suggested order of work; each ticket has its own split in your language epic with details and test commits in its Upstream Changes Summary.
      1. Test runner first – DRIVERS-3201 (OTel assertions in the unified test format), DRIVERS-3598 (schema 1.29: $$gte operator, ignoreExtraSpans at every level), DRIVERS-3597 (fixture fixes). Nothing can be verified without this.
      2. Core implementation – operation and command spans and attributes; includes DRIVERS-3393 (attribute rename), DRIVERS-3598 (getMore gets its own operation span, sibling of the cursor-creating span; db.mongodb.cursor_id MUST be set on cursor spans), DRIVERS-3617 (error.type on command spans), DRIVERS-3669 (no command spans under an unrecorded span). Sync tests from DRIVERS-3313.
      3. Prose tests – all prose tests in the spec, including the getMore ones from DRIVERS-3598.
      4. Performance gate – DRIVERS-3620: benchmark your suite with and without OTel across representative sampling rates and apply the spec's Performance Implications section. Must be done before shipping.
      5. Operation names – DRIVERS-3625: fixes and completes the Covered Operations table (countDocuments, watch, renameCollection, collection-level bulkWrite, generic cursor commands) and adds unified tests for tracing and server selection logging. Spec PR mongodb/specifications#1993 is still a draft; implement it once merged.

      Optional follow-ons, not part of this epic. Teams may schedule these after the base ships, or alongside it if they prefer; each is tracked standalone with its own language split: DRIVERS-3454 trace context propagation to the server (MongoDB 9.0+), DRIVERS-3739 log/trace correlation, DRIVERS-3627 optional span links. Further OTel work (for example metrics) will follow the same model.

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

      • Use current master of mongodb/specifications; per-ticket commits are listed on each child ticket.

      Context for other referenced/linked tickets

      Show
      DRIVERS-719 : Summary of necessary driver changes  Implement the OpenTelemetry spec ( source/open-telemetry/open-telemetry.md ) at current master. Steps 1 to 4 below are already merged into the spec, so reading current master gives you the corrected text without applying each ticket's diff; step 5 ( DRIVERS-3625 ) is not merged yet. The ticket list is the suggested order of work ; each ticket has its own split in your language epic with details and test commits in its Upstream Changes Summary. Test runner first – DRIVERS-3201 (OTel assertions in the unified test format), DRIVERS-3598 (schema 1.29: $$gte operator, ignoreExtraSpans at every level), DRIVERS-3597 (fixture fixes). Nothing can be verified without this. Core implementation – operation and command spans and attributes; includes DRIVERS-3393 (attribute rename), DRIVERS-3598 (getMore gets its own operation span, sibling of the cursor-creating span; db.mongodb.cursor_id MUST be set on cursor spans), DRIVERS-3617 ( error.type on command spans), DRIVERS-3669 (no command spans under an unrecorded span). Sync tests from DRIVERS-3313 . Prose tests – all prose tests in the spec, including the getMore ones from DRIVERS-3598 . Performance gate – DRIVERS-3620 : benchmark your suite with and without OTel across representative sampling rates and apply the spec's Performance Implications section. Must be done before shipping. Operation names – DRIVERS-3625 : fixes and completes the Covered Operations table ( countDocuments , watch , renameCollection , collection-level bulkWrite , generic cursor commands) and adds unified tests for tracing and server selection logging. Spec PR mongodb/specifications#1993 is still a draft; implement it once merged. Optional follow-ons, not part of this epic. Teams may schedule these after the base ships, or alongside it if they prefer; each is tracked standalone with its own language split: DRIVERS-3454 trace context propagation to the server (MongoDB 9.0+), DRIVERS-3739 log/trace correlation, DRIVERS-3627 optional span links. Further OTel work (for example metrics) will follow the same model. Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed) Use current master of mongodb/specifications; per-ticket commits are listed on each child ticket. Context for other referenced/linked tickets Reference implementations: Java ( JAVA-5876 ), C# ( CSHARP-4709 ), Ruby ( RUBY-3612 ), Rust ( RUST-2138 ).
    • None
    • 1.5
    • Fully Compatible
    • Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      The current diagnostics support include performance counters and trace source. .NET Core has moved towards the Activity and DiagnosticSource APIs to provide robust diagnostics and tracing. See:

      https://github.com/dotnet/diagnostics/blob/master/documentation/diagnostics-planing.md

      https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md

      https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/DiagnosticSourceUsersGuide.md

      https://devblogs.microsoft.com/aspnet/observability-asp-net-core-apps/

      Would this team consider a PR that added a new event subscriber that conforms to these guidelines and enables Activity and DiagnosticListener-based tracing? This would then enable a number of scenarios, including plugging into Activity-based observability tools.

      I have a small PoC as an example of what the code looks like:

      https://github.com/jbogard/nsb-diagnostics-poc/blob/master/MongoDB.Driver.Core.Extensions.SystemDiagnostics/DiagnosticsActivityEventSubscriber.cs

            Assignee:
            Adelin Mbida Owona
            Reporter:
            Jimmy Bogard
            None
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: