Skip to content

shadiramadan/sbt-elastic-apm

Repository files navigation

sbt-elastic-apm

Download

Add the Elastic APM Java Agent to your sbt project.

This project is heavily inspired by the sbt-datadog project.

Given the similar nature of the projects this plugin was quick to setup. Merci @guizmaii!

Prerequisites

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.

Installation

Add the following to your project/plugins.sbt file:

resolvers += Resolver.bintrayIvyRepo("shadiramadan", "sbt-plugins")

addSbtPlugin("com.shadiramadan.sbt" % "sbt-elastic-apm" % "1.0.0")

To enable the Elastic APM for your project, add the ElasticApmPlugin auto-plugin to your project.

enablePlugins(ElasticApmPlugin)

Configuration

elasticApmVersion

To use a specific Elastic APM Java Agent version, add the following to your build.sbt file:

elasticApmVersion := "1.6.1"

elasticApmServiceName

By default, the agent will use the sbt project name value as elastic.apm.service_name.

To use another value, add the following to your build.sbt file:

elasticApmServiceName := "another name"

elasticApmAgentApplicationPackages

By default, the agent elastic.apm.application_packages value is com.example.

To use another value, add the following to your build.sbt file:

elasticApmAgentApplicationPackages := Seq("com.example")

elasticApmAgentServerUrls

By default, the agent elastic.apm.server_urls value is http://localhost:8200.

To use another value, add the following to your build.sbt file:

elasticApmAgentServerUrls := Seq(url("http://localhost:8200"))

About

Add the Elastic APM Java Agent to your sbt project.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages