Created
October 3, 2019 23:14
-
-
Save tjquinno/9d5c54d2968296736992bd28a47af1ea to your computer and use it in GitHub Desktop.
This file contains 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.mycorp.myapp; | |
public class MyEndpoints { | |
@Inject | |
MetricRegistry appRegistry; | |
private Meter myMeter; | |
public MyEndpoints() { | |
myMeter = ...; | |
appRegistry.register("com.mycorp.myapp.MyEndpoints.greetings", | |
myMeter); | |
} | |
@GET | |
@Produces(MediaType.TEXT_PLAIN) | |
public String greet() { | |
myMeter.mark(); | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment