| Constructor and Description |
|---|
MetricsQuery(org.apache.skywalking.oap.server.library.module.ModuleManager moduleManager) |
| Modifier and Type | Method and Description |
|---|---|
List<MetricDefinition> |
listMetrics(String regex)
Get the list of all available metrics in the current OAP server.
|
HeatMap |
readHeatMap(MetricsCondition condition,
Duration duration)
Heatmap is bucket based value statistic result.
|
List<MetricsValues> |
readLabeledMetricsValues(MetricsCondition condition,
List<String> labels,
Duration duration)
Read value in the given time duration, usually as a linear.
|
long |
readMetricsValue(MetricsCondition condition,
Duration duration)
Read metrics single value in the duration of required metrics
|
MetricsValues |
readMetricsValues(MetricsCondition condition,
Duration duration)
Read time-series values in the duration of required metrics
|
List<SelectedRecord> |
readSampledRecords(TopNCondition condition,
Duration duration)
Read the sampled records.
|
List<SelectedRecord> |
sortMetrics(TopNCondition condition,
Duration duration)
Read entity list of required metrics and parent entity type.
|
MetricsType |
typeOfMetrics(String name)
Metrics definition metadata query.
|
public MetricsQuery(org.apache.skywalking.oap.server.library.module.ModuleManager moduleManager)
public MetricsType typeOfMetrics(String name) throws IOException
IOExceptionpublic List<MetricDefinition> listMetrics(String regex)
regex - to filter the metrics by name, if existing.public long readMetricsValue(MetricsCondition condition, Duration duration) throws IOException
IOExceptionpublic MetricsValues readMetricsValues(MetricsCondition condition, Duration duration) throws IOException
IOExceptionpublic List<SelectedRecord> sortMetrics(TopNCondition condition, Duration duration) throws IOException
IOExceptionpublic List<MetricsValues> readLabeledMetricsValues(MetricsCondition condition, List<String> labels, Duration duration) throws IOException
labels - the labels you need to query.IOExceptionpublic HeatMap readHeatMap(MetricsCondition condition, Duration duration) throws IOException
HeatMap.getBuckets() HeatMap.HeatMapColumn#getValues() follows this rule.
key = 0, represents [0, 100), value = count of requests in the latency range.
key = 100, represents [100, 200), value = count of requests in the latency range.
...
key = step * maxNumOfSteps, represents [step * maxNumOfSteps, MAX)
IOExceptionpublic List<SelectedRecord> readSampledRecords(TopNCondition condition, Duration duration) throws IOException
IOExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.