Ananke is a Java library that allows Java applications to communicate with and send information to a StatsD listener. You can use Ananke to send metrics from your Java applications to a StatsD server, which will then send the metrics to CloudWisdom.
StatsDClient client = new NetuitiveStatsDClient("localhost", "8000");
4. Utilize code instrumentation to send metrics, service checks, and more into CloudWisdom (basic examples included below each type). CloudWisdom supports the following metric types: - Decrement (Counter – Down): Decrease the count of how many times something happened per second.
client.decrement(new DecrementRequest()
.withMetric("tokens_left.count")
.withValue(-1));
client.event(new EventRequest()
.withTitle("Event Title")
.withText("Send help!"));
client.gauge(new GaugeRequest()
.withMetric("gas_tank.level")
.withValue(1L));
client.histogram(new HistogramRequest()
.withMetric("file.upload.size")
.withValue(2MB));
client.increment(new IncrementRequest()
.withMetric("page_view.count")
.withValue(1));
client.servicecheck(new ServiceCheckRequest()
.withName("my_service")
.withStatus(1));
client.set(new SetRequest()
.withName("users.unique")
.withValue(user.id));
client.timed(new TimedRequest()
.withFunc("pageloadtime()");
client.timing(new TimingRequest()
.withMetric("x")
.withValue(xms));
We have several different options for monitoring Java applications. Each method varies in terms of setup difficulty and the amount / type of information it collects.
Method | Description |
---|---|
Ananke | Java library you can use to push metrics to the StatsD listener embedded in our Linux agent. This approach requires that you integrate the StatsDReporter into your applications. |
Dropwizard | Integrate the dropwizard-metrics library into your Dropwizard application and configure it to send metrics to the StatsD listener embedded in our Linux agent. |
Iris | Java library you can use to push metrics directly to CloudWisdom’s REST API. |
Java Agent | Open-source and open-license Java agent the does the byte-code instrumentation for you. No changes to source code required. |
JMX | Integration that relies on our Linux agent to collect JVM metrics (e.g., heap size, garbage collection, etc.) without code-level instrumentation. |