Skip to content

Kamon extension to ship Kamon metrics to AWS Cloudwatch

License

Notifications You must be signed in to change notification settings

theiterators/kamon-cloudwatch

 
 

Repository files navigation

Kamon AWS Cloudwatch Extension

Overview

A simple Kamon extension to ship metrics data to Cloudwatch using Amazon's async client.

Note: This project has been initially forked from Timeout's kamon-cloudwatch but evolved separately as the original one has fallen out of maintenance.

Version Compatibility Matrix

The following table maps Kamon core version with the version of this library:

Kamon Core Kamon CloudWatch Scala JDK
2.5.x 2.5.x 2.13 1.8+

Getting Started

Add library dependency to your build.sbt

libraryDependencies += "pl.iterators" %% "kamon-cloudwatch" % "<version>"

The module will be loaded automatically and you should see "Starting the Kamon CloudWatch extension" message in your logs output.

Note: Be sure the box in which this is going to be used, has the proper access credentials to send data to AWS CloudWatch. The preferred approach would be to either use an InstanceProfile or roles in the case of ECS/Docker Containers. Another way would be to have the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY set correctly.

Configuration

You can configure the module behaviour by overriding any of the following settings in your application.conf file:

kamon.cloudwatch {
  # namespace is the AWS Metrics custom namespace
  namespace = kamon-cloudwatch

  # batch size of data when send to Cloudwatch
  batch-size = 20

  # Executor context threads.
  execution-context-threads = 4

  # You can override cloudwatch endpoint. Useful for testing against localstack
  # cloudwatch-endpoint-override = ""

  # Whether to include Kamon environmental tag to cloudwatch metrics. Default is false
  # include-environment-tags = false
}

kamon.modules.cloudwatch.enabled = true

License

About

Kamon extension to ship Kamon metrics to AWS Cloudwatch

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%