This project is a fork of Colisweb/sbt-datadog with support for sbt 0.13
This project is highly inspired by the fantastic sbt-newrelic project.
We want to thanks Gilt for their work on sbt-newrelic
that allowed us to create this project really quickly.
The plugin assumes that sbt-native-packager has been included in your SBT build configuration. This can be done by adding the plugin following instructions at http://www.scala-sbt.org/sbt-native-packager/ or by adding another plugin that includes and initializes it (e.g. the SBT plugin for Play 2.6.x).
Add the following to your project/plugins.sbt
file:
addSbtPlugin("com.github.gjsduarte" % "sbt-datadog" % "0.2.0")
To enable the Datadog APM for your project, add the DatadogAPM
auto-plugin to your project.
enablePlugins(DatadogAPM)
To use a specific Datadog Java APM Agent version, add the following to your build.sbt
file:
datadog.apmVersion := "0.10.0"
By default, the agent will use the sbt project name
value as service.name
.
To use another value, add the following to your build.sbt
file:
datadog.serviceName := "another name"
You can use your host (where you code run) enviroment variables in the value:
datadog.serviceName := "another name ${MY_HOST_ENV_VAR}"
By default, the agent agent.host
value is localhost
.
To use another value, add the following to your build.sbt
file:
datadog.agentHost := "127.0.0.1"
You can use your host (where you code run) enviroment variables in the value:
datadog.serviceName := "${MY_DD_HOST_IP}"
By default, the agent agent.port
value is 8126
.
To use another value, add the following to your build.sbt
file:
datadog.agentPort := 9999
You can use your host (where you code run) enviroment variables in the value:
datadog.agentPort := "${MY_DD_PORT}"
By default, the env
is not set.
To set the env
, add the following to your build.sbt
file:
datadog.environment := "staging"
You can use your host (where you code run) enviroment variables in the value:
datadog.environment := "${MY_ENV}"
Netty Http Server and Client Instrumentation. Default value is false
.
To use another value, add the following to your build.sbt
file:
datadog.enableNetty := true
Akka-Http Server and Lagom Framework Instrumentation. Default value is false
.
To use another value, add the following to your build.sbt
file:
datadog.enableAkkaHttp := true
To return debug level application logs, enable debug mode with this flag. Default value is false
.
To use another value, add the following to your build.sbt
file:
datadog.enableDebug := true
For more configuration option, look at the Datadog Java APM agent documentation: https://docs.datadoghq.com/tracing/setup/java/