Skip to content

Instantly share code, notes, and snippets.

@autoletics
Last active February 10, 2017 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save autoletics/20b3f85fa29f2f6cd1a6e02723f2337a to your computer and use it in GitHub Desktop.
Save autoletics/20b3f85fa29f2f6cd1a6e02723f2337a to your computer and use it in GitHub Desktop.
import static org.jinspired.probes.Probes.*;
import org.jinspired.probes.interceptor.*;
public final class InterceptorFactory implements ProbesInterceptorFactory {
private Name meter;
@Override public void init(Environment env) {
meter = env.getName(name("meter"),
name("clock").name("time")); // default is clock.time
}
@Override public ProbesInterceptor create(Context ctx) {
return new Interceptor(ctx, meter);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment