https://github.com/kevinconaway/akka-dropwizard
Dropwizard Metrics for Akka Actors
https://github.com/kevinconaway/akka-dropwizard
akka dropwizard dropwizard-metrics java metrics scala
Last synced: 5 months ago
JSON representation
Dropwizard Metrics for Akka Actors
- Host: GitHub
- URL: https://github.com/kevinconaway/akka-dropwizard
- Owner: kevinconaway
- License: apache-2.0
- Created: 2018-06-12T01:06:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-10T17:30:31.000Z (almost 8 years ago)
- Last Synced: 2026-01-11T19:33:46.400Z (6 months ago)
- Topics: akka, dropwizard, dropwizard-metrics, java, metrics, scala
- Language: Java
- Size: 47.9 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dropwizard Metrics for Akka Actors

This project instruments an Akka ActorSystem to provide Dropwizard metrics for Actors. Currently, the following
metrics are captured:
* A [`Gauge`](https://metrics.dropwizard.io/4.0.0/manual/core.html#gauges) for the size of an Actors mailbox
* A [`Timer`](https://metrics.dropwizard.io/4.0.0/manual/core.html#timers) measuring how long a message sits in an Actors mailbox
# Usage
This project is composed of two modules:
* _akka-dropwizard-agent_, a java agent which performs the ActorSystem instrumentation
* _akka-dropwizard-metrics_ which contains the code to configure the agent.
First, include the _akka-dropwizard-metrics_ module in your project:
com.github.kevinconaway
akka-dropwizard-metrics
1.2
There is a singleton configuration class, `AkkaDropwizard` that must be configured *before* the `ActorSystem` is created
```java
MetricRegistry registry = ...
AkkaDropwizard.configure(registry);
```
By default, the metrics will be stored under a root prefix called _actor-metrics_. You can customize this by providing
an instance of `AkkaDropwizardSettings` to `AkkaDropwizard`
```java
AkkaDropwizardSettings settings = ...
MetricRegistry registry = ...
AkkaDropwizard.configure(registry, settings);
```
The instrumentation is performed by a java agent that you need to run with your application. Add the following
argument to your VM startup properties:
-javaagent:/path/to/akka-dropwizard-agent-1.2.jar
# Compatibility Matrix
Below are the versions Akka and Dropwizard that this library uses in each version
| This Project | Akka Version | Dropwizard Version | Spring Boot Version |
| ------------ | ------------ | ------------------- | --------------------
| 1.0 | 2.5.x (Scala 2.12) | 3.2.x | N/A
| 1.1 | 2.5.x (Scala 2.12) | 3.2.x | 2.0.x
| 1.2 | 2.5.x (Scala 2.12) | 3.2.x | 2.0.x