Sending Traces to Jaeger

Using the CLI

If you create your project using the Micronaut CLI, supply the tracing-jaeger feature to include Jaeger tracing in your project:

  1. $ mn create-app my-app features tracing-jaeger

To send tracing spans to Jaeger, the minimal configuration requires the following dependency in your build:

  1. implementation("io.jaegertracing:jaeger-thrift:0.31.0")
  1. <dependency>
  2. <groupId>io.jaegertracing</groupId>
  3. <artifactId>jaeger-thrift</artifactId>
  4. <version>0.31.0</version>
  5. </dependency>

Then enable Jaeger tracing in your configuration (potentially only your production configuration):

application.yml

  1. tracing:
  2. jaeger:
  3. enabled: true

By default, Jaeger will be configured to send traces to a locally running Jaeger agent.