Skip to content

isabella232/appsignal-kafka-statsd-interceptor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kafka StatsD Interceptor

This project attempts to create a Kafka Interceptor that sends metrics to StatsD.

https://cwiki.apache.org/confluence/display/KAFKA/KIP-42%3A+Add+Producer+and+Consumer+Interceptors

Building the interceptor

The interceptor runs on Java 1.8. Download and install it from the Oracle website (yuck :-):

https://java.com/en/download

Then install Gradle, that's a combination of Bundler and Rake which downloads dependencies and runs builds and tests.

brew install gradle

Then run the tests: gradle test. And build: gradle build.

Enable the interceptor

  1. Make sure the build .jar is in your classpath
  2. Add the interceptor(s) to your properties:
producer.interceptor.classes=com.appsignal.kafka.StatsdProducerInterceptor
consumer.interceptor.classes=com.appsignal.kafka.StatsdConsumerInterceptor

Configure the interceptor

Accepted configuration:

statsd.host   (defaults to "localhost")
statsd.port   (defaults to 8125)
statsd.prefix (defaults to "")

For either the consumer or the producer interceptor set the config:

# Producer
producer.interceptor.statsd.host=localhost
producer.interceptor.config.statsd.host=8125
producer.interceptor.statsd.prefix=kafka

# Consumer
consumer.interceptor.statsd.host=localhost
consumer.interceptor.config.statsd.host=8125
consumer.interceptor.statsd.prefix=kafka

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%