Last active
December 11, 2015 22:09
-
-
Save yukim/4667939 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Manifest-Version: 1.0 | |
Premain-Class: com.datastax.example.ReportAgent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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