Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Indicates a field or method should be collected for monitoring. The attributes annotated should be thread-safe for access by a background thread. If a method is annotated it should be inexpensive and avoid any potentially costly operations such as IO and networking. Expect that the fields will be polled frequently and cache values that require expensive computation rather than computing them inline.
|name||String||A name for what you are monitoring.|
|description||String||A description of what the monitor does.|
|type||Enum (DataSourceType)||The type for the value. The three supported types are GAUGE, COUNTER, and INFORMATIONAL. All metrics should be either GAUGE or COUNTER, other non-numeric values that might be useful for debugging should be INFORMATIONAL. A gauge is a numeric value that can be sampled to get the current value. A counter is a non-decreasing numeric type that can be converted into a rate of change for a given period by comparing multiple samples.|
@Monitor(name="UpdateCount", type= DataSourceType.COUNTER, description="Total number of update operations.") protected final AtomicInteger updateCount = new AtomicInteger(0);
A method or field that is of the type TagList. This allows a set of tags to be specified dynamically when an instance is registered instead of only at compile time using the annotation.
@MonitorTags private final TagList tags;