Skip to content

mattcarrier/metrics-transport

Repository files navigation

metrics-transport

A serialization and transport library for Dropwizard Metrics.

Aggregate your metrics for easier storage and reporting by serializing and transporting them to a centralized service.

Available Serializers:

Available Transports:

Available Consumers:

Travis SonarQube Tech Debt Coveralls Maven Central

Usage

  1. Include the appropriate transport library
...
<dependency>
  <groupId>io.github.mattcarrier.metrics.transport</groupId>
  <artifactId>metrics-rabbit</artifactId>
  <version>0.4.0</version>
</dependency>
...
  1. Optional: Include a serialization library (will default to Java Serialiation if none available)
...
<dependency>
  <groupId>io.github.mattcarrier.metrics.transport</groupId>
  <artifactId>metrics-serialization-kryo</artifactId>
  <version>0.4.0</version>
</dependency>
...
  1. Include the appropriate consumption library
...
<dependency>
  <groupId>io.github.mattcarrier.metrics.transport</groupId>
  <artifactId>metrics-consumption-influxdb</artifactId>
  <version>0.5.0-SNAPSHOT</version>
</dependency>
...

4a. Serialization: Create and start the transport reporter

RabbitReporter reporter = new RabbitReporter.Builder(registry).metricMeta(metricMeta)
    .build(new RabbitClient.Builder().host(RABBIT_HOST).durable(false).autoDelete(true).build());
reporter.start(100, TimeUnit.MILLISECONDS);

4b. Deserialization: Create and start the consumer

RabbitClient client = new RabbitClient.Builder().build();
InfluxDbMetricConsumer consumer = new InfluxDbMetricConsumer.Builder().build();
client.consume("myConsumerTag", consumer);

Development

Metrics-Transport is built entirely using Docker and dobi.

Requirements

Build

dobi

About

Transport and serialization for dropwizard metrics

Resources

License

Stars

Watchers

Forks

Packages

No packages published