Drop-in enhancement for Dropwizard Metrics which provide metric persistence using Redis DB via Redisson library.
Uses XStream library for serialization.
ALPHA QUALITY Use only if you intend to help improve it.
- Gauge implemented as passthrough metric. Only saved if you call Gauge.getValue() method, either by yourself or by reporter.
- Obvious latency issues. Use only for important selected metrics.
- Values use custom serialization
Replace your usual
new MetricRegistry();
with improved
new PersistentMetricRegistry();
Maven repository is created using jitpack.io . Configure maven using following steps.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.wizecore</groupId>
<artifactId>persistent-metrics</artifactId>
<version>0.8</version>
</dependency>
By default it uses locally installed Redis (default port, i.e. 6379) To configure use following environment variables:
- REDIS_CONF - Redisson JSON config file. Takes precedence.
- REDIS_ADDR - host:port for single server. Have no effect if REDIS_CONF is defined.
- METRIC_PREFIX - Prefix for all values stored. Default is "metrics.". Dot at the end is added automatically.
- REDIS_PASSWORD - Password for single server. Have no effect if REDIS_CONF is defined.
Copyright (c) 2010-2017 Coda Hale, Yammer.com, Wizecore
Published under Apache Software License 2.0, see LICENSE