Enhance Tracing with Spans

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Critical - P2
    • 5.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Java Drivers
    • Not 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

      Spring Data MongoDB leverages observability features (such as command listeners and connection pool hooks) to report metrics. While this is useful, it does not utilize the tracing API to create spans.

      In our implementation, we should focus on generating spans at the operation level. This approach integrates into a holistic view of the operation flow. For example, tracing from an HTTP call to a backend service, which then invokes a microservice that interacts with the MongoDB driver, provides significantly more context for understanding application behavior than standalone gauges or metric reports.

      Note: Default metrics can be disabled in the configuration to avoid duplication between observability and tracing.

      management.metrics.mongo.command.enabled=false management.metrics.mongo.connectionpool.enabled=false
      

            Assignee:
            Nabil Hachicha
            Reporter:
            Alex Bevilacqua
            Ross Lawley, Slav Babanin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: