Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

quarkiverse/quarkus-datadog-opentracing

Repository files navigation

Quarkus - Datadog Opentracing

All Contributors

EDIT 2022-08-04: This extension won't be maintained anymore.

Recently, Datadog has integrated their OTEL collector directly into their Datadog Agent. Therefore, (my) recommendation from now is to:

  • use OTEL in your Quarkus applications
  • configure the Datadog Agent to enable the OTEL collector
  • configure the OTEL extension in your Quarkus application to target the Datadog Agent OTEL collector by passing the required IP/port location as environment variable at startup / runtime.

About this extension

This repository hosts an extension to support and activate the Datadog opentracing tracer.

Both JVM and Native modes are supported.

This extension is not providing any opentracing capability feature. For that, please please add the quarkus-smallrye-opentracing extension and any other additional 3rd party instrumentation library you would need to cover sub systems not already covered by smallrye-opentracing.

This extension is for you if:

  • You are using Quarkus or is interested in migrating to Quarkus
  • You don't want to use Datadog's java agent for tracing capabilities
  • You want to have Datadog tracing capabilities on your application running in Native.

Future support of this extension

The support for this extension may stop as soon as Datadog provides a full support of the OpenTelemetry Collector, especially (at the date of this README):

  • the support of generic JVM metrics as non custom metrics when coming from OpenTelemetry
  • the support of log collection & forwarding on the Datadog OpenTelemetry exporter (to avoid to have to install and run both Datadog & OpenTelemetry agents on your infrastructure)

How to setup the extension

The extension is enabled by default.

The logs injection feature is configured based on Datadog configuration and therefore enabled by default.

To deactivate the extension, or the logs correlation feature:

quarkus.datadog.enabled=false
dd.logs.injection=false

A more complete example on how to setup your project for this extension is available here

You will also find small guides to run your application with a local Datadog agent, and how to setup your Datadog account to get the correlation between traces and logs.

Datadog tracer configuration

All official datadog tracer's properties are supported as long as the namings are correct according to the official documentation. Properties should be configured under dd root property.

Configuration example:

dd.logs.injection=true
dd.agent.host=some-agent-hostname
dd.trace.agent.port=1234

Environment variable support

Instead of configuring the tracer from your application properties, you can also setup that configuration from environment variables. The extension would discover all environment variables starting with the prefix DD_ and map it to their corresponding properties (i.e. dd.some.property)

Be careful, an environment variable overrides its property value

Libraries support matrix

This extension support / has been tested with

Extension version Quarkus DD Trace API/OT
1.0.x 1.x to 2.1.1 0.74.0 to 0.83.0
1.1.x 2.2.2 0.83.2 to 0.86.0

Contributors ✨

Thanks goes to these wonderful people (emoji key):


nvivot

💻 🚧

This project follows the all-contributors specification. Contributions of any kind welcome!