AEM: Integrate Graphite Metrics


Especially when you have larger services running in your Adobe Experience Manager an metrics database can become quite handy (for both developers and the customer).

We decided to use Graphite as database and visualize the data with Grafana.

Integration in your project

The Caravan project provides a Maven Module you can use in your project.


Depending on your project, you might need to include the Dropwizard Metrics Libraries.


After deploying the packages, you’ll find a new Configuration in your OSGi console. Caravan Resilient Http Graphite Integration Configuration


You can now inject the MetricRegistry into your components and use it as described in Dropwizard’s Manual

private MetricRegistry metricRegistry;

public void someThingWithTimer() {
  Context timer = metricRegistry.timer("myTimerName").time();
  // Do some stuff...


Note: Although this posts describes how to use Graphite in AEM, it’s also no problem to use this for a plain OSGi project.