Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-5598

[Investigation] Add support for Micrometer Tracing to MongoDB Java Driver

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Java Drivers
    • 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?

      In DRIVERS-719, we plan to support client-side tracing in line with the standards defined by OpenTelemetry. Separately, we have heard from users that there is a desire for Micrometer support. Some are coming from Spring environments, and likely to use Micrometer. Our goal is to support both Micrometer and OpenTelemetry for Java users, as both are in use today.

      Micrometer Tracing is a facade over the OpenTelemetry tracer, and is meant to add little to no overhead to the tracing collection activity. There is a bridge to ship spans to OpenTelemetry – micrometer-tracing-bridge-otel – that we can possibly build off of for OpenTelemetry support down the line.

      In this ticket, could we create a proof of concept to show Micrometer support in the Java Driver? We can tightly scope this to the sync driver only, and specifically traces.

      Some things we should consider:

      1. What is the user experience if you are using Micrometer in your application, and you connect to the version of the driver that supports Micrometer Tracing? Do your traces get collected by default?
      2. What dependencies should we take?
      3. What can Micrometer report on, and what makes sense for us to collect based on the overall goals of the OpenTelemetry effort + database semantic conventions for OpenTelemetry?
      4. What if you are using OpenTelemetry? Can you tie your Micrometer spans generated by the driver to the OpenTelemetry spans that your application is already generating?

      We might be able to lean on the Spring Data team here, as they already have Micrometer Tracing support in Spring Data MongoDB: https://docs.spring.io/spring-data/mongodb/reference/observability/observability.html.

            Assignee:
            Unassigned Unassigned
            Reporter:
            ashni.mehta@mongodb.com Ashni Mehta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: