|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value={FIELD,METHOD}) public @interface Probe
Annotation that can be placed on a field or method of an object to indicate that it should be tracked by the
MetricsRegistry when the MetricsRegistry.scanAndRegister(Object, String)
is called.
The MetricsRegistry will automatically scan all interfaces and super classes of an object (recursively). So it is possible
to define a Gauge on e.g. an interface or abstract class.
Field
provides access to the actual field without the need for autoboxing. With the Method
a wrapper
object is created when a primitive is returned by the method. Therefor fields produce less garbage than methods.
A Gauge can be placed on field or methods with the following (return) type:
Optional Element Summary | |
---|---|
String |
name
The name of the gauge. |
public abstract String name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |