Skip to content

Annotations

Greg Orzell edited this page Jan 28, 2012 · 10 revisions

@Monitor

Used to identify a field or method in your application that you want to monitor using JMX, and possibly publish to other systems.

Keys Type Description
name String A name for what you are monitoring.
description String A description of what the monitor does.
type Enum (DataSourceType) The type of com.netflix.autoscaling.tools.data that will be collected.
tags String[] An array of key, value pairs to help identify and filter this monitor. Format is key=value everything before the first “=” will be parsed as the key.
@Monitor(name="UpdateCount", type= DataSourceType.COUNTER,
         description="Total number of times update has been called on the wrapped observer."
         tags={})
protected final AtomicInteger updateCount = new AtomicInteger(0);

@MonitorId

@MonitorId
protected final String name;

@MonitorTags

A method of field that is of the type List. This allows you to dynamically set tags inside your code.

@MonitorTags
Clone this wiki locally