@RequestMapping(value="/spectator/metrics")
@RestController
@ConditionalOnExpression(value="${spectator.web-endpoint.enabled:false}")
public class MetricsController
extends Object
| Modifier and Type | Field and Description |
|---|---|
static Predicate<com.netflix.spectator.api.Measurement> |
ALL_MEASUREMENTS_FILTER
A measurement filter that accepts all measurements.
|
| Constructor and Description |
|---|
MetricsController() |
| Modifier and Type | Method and Description |
|---|---|
Predicate<com.netflix.spectator.api.Measurement> |
getDefaultMeasurementFilter()
The default measurement filter is configured through properties.
|
ApplicationRegistry |
getMetrics(Map<String,String> filters)
Endpoint for querying current metric values.
|
static String |
meterToKind(com.netflix.spectator.api.Registry registry,
com.netflix.spectator.api.Meter meter)
Determine the type of a meter for reporting purposes.
|
public static final Predicate<com.netflix.spectator.api.Measurement> ALL_MEASUREMENTS_FILTER
public Predicate<com.netflix.spectator.api.Measurement> getDefaultMeasurementFilter() throws IOException
IOException@RequestMapping(method=GET) public ApplicationRegistry getMetrics(@RequestParam Map<String,String> filters) throws IOException
IOExceptionpublic static String meterToKind(com.netflix.spectator.api.Registry registry, com.netflix.spectator.api.Meter meter)
registry - Used to provide supplemental information (e.g. to search for the meter).meter - The meters whose kind we want to know.