Skip to content

Instantly share code, notes, and snippets.

@yukim
Last active December 11, 2015 22:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yukim/4667939 to your computer and use it in GitHub Desktop.
Save yukim/4667939 to your computer and use it in GitHub Desktop.
Manifest-Version: 1.0
Premain-Class: com.datastax.example.ReportAgent
package com.datastax.example;
import java.lang.instrument.Instrumentation;
import java.util.concurrent.TimeUnit;
import com.yammer.metrics.reporting.GraphiteReporter;
public class ReportAgent
{
public static void premain(String agentArgs, Instrumentation inst)
{
// reports metrics to Graphite at 127.0.0.1:2003, every 60 seconds
GraphiteReporter.enable(60, TimeUnit.SECONDS, "127.0.0.1", 2003);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment