Skip to content

New Relic monitoring integration for SBT with sbt-native-packager

License

Notifications You must be signed in to change notification settings

paololim/sbt-newrelic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbt-newrelic

Join the chat at https://gitter.im/gilt/sbt-newrelic

newrelic support for any artifacts built with sbt-native-packager

Useful Links

The following is a list of useful links related to newrelic:

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 (e.g. the SBT plugin for Play 2.4.x).

Installation for sbt-native-packager 0.7.x (and Play 2.3.x)

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

addSbtPlugin("com.gilt.sbt" % "sbt-newrelic" % "0.0.10")

To use the NewRelic settings in your project, add NewRelic.packagerSettings to your build. If you are manually adding sbt-native-packager archetypes, you should add this line after the archetype has set default values for settings.

NewRelic.packagerSettings

Installation for sbt-native-packager 1.0.x (and Play 2.4.x)

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

addSbtPlugin("com.gilt.sbt" % "sbt-newrelic" % "0.1.5")

To use the NewRelic settings in your project, add the NewRelic auto-plugin to your project.

enablePlugins(NewRelic)

Configuration

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

newrelicVersion := "3.27.0"

To add a New Relic license key to the generated newrelic.yml file, add the following to your build.sbt file:

newrelicLicenseKey := Some("1234567890abcdef")

An alternative approach is to pass the license key to your application via the NEW_RELIC_LICENSE_KEY environment variable.

To enable custom tracing, add the following to your build.sbt file:

newrelicCustomTracing := true

To include the New Relic client API in your project's library dependencies, add to your build:

newrelicIncludeApi := true

To provide a static newrelic.yml file instead of a generated file, place the file somewhere (e.g. resourceDirectory, which is conf/ by default for Play applications, or src/main/resources for many other builds), and refer to it from your build like this:

newrelicConfig := (resourceDirectory in Compile).value / "newrelic.yml"

The application name reported to New Relic may be modified by setting newrelicAppName, the default value is the name of the project.

newrelicAppName := "My Application"

About

New Relic monitoring integration for SBT with sbt-native-packager

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%