Class DefaultOpenTsdbNamingStrategy
- java.lang.Object
- org.springframework.boot.actuate.metrics.opentsdb.DefaultOpenTsdbNamingStrategy
- All Implemented Interfaces:
OpenTsdbNamingStrategy
public class DefaultOpenTsdbNamingStrategy extends Object implements OpenTsdbNamingStrategy
A naming strategy that just passes through the metric name, together with tags from a set of static values. Open TSDB requires at least one tag, so tags are always added for you: the "domain" key is added with a value "spring", and the "process" key is added with a value equal to the object hash of "this" (the naming strategy). The "domain" value is a system identifier - it would be common to all processes in the same distributed system. In most cases this will be unique enough to allow aggregation of the underlying metrics in Open TSDB, but normally it is best to provide your own tags, including a prefix and process identifier if you know one (overwriting the default).- Since:
- 1.3.0
Field Summary
Fields Modifier and Type Field Description static String
DOMAIN_KEY
The domain key.static String
PROCESS_KEY
The process key.
Constructor Summary
Constructors Constructor Description DefaultOpenTsdbNamingStrategy()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenTsdbName
getName(String name)
Convert the metric name into aOpenTsdbName
.void
setTags(Map<String,String> staticTags)
Field Detail
DOMAIN_KEY
public static final String DOMAIN_KEY
The domain key.- See Also:
- Constant Field Values
PROCESS_KEY
public static final String PROCESS_KEY
The process key.- See Also:
- Constant Field Values
Constructor Detail
DefaultOpenTsdbNamingStrategy
public DefaultOpenTsdbNamingStrategy()
Method Detail
getName
public OpenTsdbName getName(String name)
Description copied from interface:OpenTsdbNamingStrategy
Convert the metric name into aOpenTsdbName
.- Specified by:
getName
in interfaceOpenTsdbNamingStrategy
- Parameters:
name
- the name of the metric- Returns:
- an Open TSDB name