Contrail (Elasticsearch events)

Using Contrail as an event backend is really powerful. Events get logged to Elasticsearch packed with lots of information that can help figure out what lead to them. Lightbend Telemetry generates Akka actor events for dead letters, unhandled messages, log errors/warnings and exceptions. Furthermore, Lagom circuit breaker state changes are also logged as events.

Using the Contrail backend will enable you to understand more about the events happening in your system.

Note: Contrail only supports Akka 2.4 and greater.

Cinnamon dependency

First make sure that your build is configured to use the Cinnamon Agent.

Thereafter add this resolver:

sbt
resolvers += "lightbend-contrail" at "https://dl.bintray.com/typesafe/commercial-maven-releases"
Maven
<repository>
    <id>lightbend-contrail</id>
    <name>Lightbend Contrail</name>
    <url>https://dl.bintray.com/typesafe/commercial-maven-releases</url>
</repository>
Gradle
maven {
    url = 'https://dl.bintray.com/typesafe/commercial-maven-releases'
}

Finally, add the Elasticsearch Events plugin dependency to your build:

sbt
libraryDependencies += Cinnamon.library.cinnamonContrail
Maven
<dependency>
  <groupId>com.lightbend.cinnamon</groupId>
  <artifactId>cinnamon-contrail_2.11</artifactId>
  <version>2.5.0</version>
</dependency>
Gradle
dependencies {
  compile group: 'com.lightbend.cinnamon', name: 'cinnamon-contrail_2.11', version: '2.5.0'
}

Configuration

Below is the configuration needed to set up Contrail.

contrail.syslog.server.elasticsearch {
  enabled = true
  uri = "http://127.0.0.1:9200"
  index = "my-index"
}

Run your application and events will be published to Elasticsearch under the index defined in the configuration section here above.