@Internal @ParametersAreNonnullByDefault public class Metrics extends Object
MetricTimer, LongRunningMetricTimer, and Histogram.
Please move to using the builder.
try (Ticker autoclosed = Metrics.metric("my-timer").startTimer()) {
// monitored code block here
}
| Modifier and Type | Class and Description |
|---|---|
static class |
Metrics.Builder
A metric builder, to get started call
metric(String). |
| Modifier and Type | Method and Description |
|---|---|
static MetricsConfiguration |
getConfiguration()
Get the current
MetricsConfiguration. |
static Histogram |
histogram(String name)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static Histogram |
histogram(String name,
Collection<MetricTag.RequiredMetricTag> tags)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static Histogram |
histogram(String name,
MetricTag.RequiredMetricTag... tags)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static LongRunningMetricTimer |
longRunningTimer(String name)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static LongRunningMetricTimer |
longRunningTimer(String name,
Collection<MetricTag.RequiredMetricTag> tags)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static LongRunningMetricTimer |
longRunningTimer(String name,
MetricTag.RequiredMetricTag... tags)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static Metrics.Builder |
metric(String name)
Start creating a metric using the
Metrics.Builder |
static void |
resetMetric(MetricKey metricKey)
Resets (that may mean removal depending on the metric strategy) a specific metric that exactly matches a
MetricKey. |
static Ticker |
startLongRunningTimer(String name)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static Ticker |
startLongRunningTimer(String name,
Collection<MetricTag.RequiredMetricTag> tags)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static Ticker |
startLongRunningTimer(String name,
MetricTag.RequiredMetricTag... tags)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static Ticker |
startTimer(String name)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static Ticker |
startTimer(String name,
Collection<MetricTag.RequiredMetricTag> tags)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static Ticker |
startTimer(String name,
MetricTag.RequiredMetricTag... tags)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static MetricTimer |
timer(String name)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static MetricTimer |
timer(String name,
Collection<MetricTag.RequiredMetricTag> tags)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
static MetricTimer |
timer(String name,
MetricTag.RequiredMetricTag... tags)
Deprecated.
since 4.3.0, for removal in 5.0.0, use the
metric(String) builder instead. |
public static void resetMetric(MetricKey metricKey)
MetricKey.metricKey - metric key to be reset.@Nonnull public static MetricsConfiguration getConfiguration()
MetricsConfiguration.@Deprecated @Nonnull public static Histogram histogram(String name)
metric(String) builder instead.Histogram with the given name.Histogram@Deprecated @Nonnull public static Histogram histogram(String name, Collection<MetricTag.RequiredMetricTag> tags)
metric(String) builder instead.Histogram with the given name, and tags it with the given tags.
See Metrics.Builder.tags(Iterable) for more information about tag behaviour.
Histogram@Deprecated @Nonnull public static Histogram histogram(String name, MetricTag.RequiredMetricTag... tags)
metric(String) builder instead.Histogram with the given name, and tags it with the given tags.
See Metrics.Builder.tags(Iterable) for more information about tag behaviour.
Histogram@Deprecated @Nonnull public static MetricTimer timer(String name)
metric(String) builder instead.MetricTimer with the given name.MetricTimer@Deprecated @Nonnull public static MetricTimer timer(String name, Collection<MetricTag.RequiredMetricTag> tags)
metric(String) builder instead.MetricTimer with the given name, and tags it with the given tags.
See Metrics.Builder.tags(Iterable) for more information about tag behaviour.
MetricTimer@Deprecated @Nonnull public static MetricTimer timer(String name, MetricTag.RequiredMetricTag... tags)
metric(String) builder instead.MetricTimer with the given name, and tags it with the given tags.
See Metrics.Builder.tags(Iterable) for more information about tag behaviour.
MetricTimer@Deprecated @Nonnull public static LongRunningMetricTimer longRunningTimer(String name)
metric(String) builder instead.LongRunningMetricTimer with the given name.LongRunningMetricTimer@Deprecated @Nonnull public static LongRunningMetricTimer longRunningTimer(String name, Collection<MetricTag.RequiredMetricTag> tags)
metric(String) builder instead.LongRunningMetricTimer with the given name, and tags it with the given tags.
See Metrics.Builder.tags(Iterable) for more information about tag behaviour.
LongRunningMetricTimer@Deprecated @Nonnull public static LongRunningMetricTimer longRunningTimer(String name, MetricTag.RequiredMetricTag... tags)
metric(String) builder instead.LongRunningMetricTimer with the given name, and tags it with the given tags.
See Metrics.Builder.tags(Iterable) for more information about tag behaviour.
LongRunningMetricTimer@Deprecated @Nonnull public static Ticker startTimer(String name)
metric(String) builder instead.MetricTimer with the given name.Ticker to stop the created and started MetricTimer@Deprecated @Nonnull public static Ticker startTimer(String name, MetricTag.RequiredMetricTag... tags)
metric(String) builder instead.MetricTimer with the given name, and tags it with the given tags.
See Metrics.Builder.tags(Iterable) for more information about tag behaviour.
Ticker to stop the created and started MetricTimer@Deprecated @Nonnull public static Ticker startTimer(String name, Collection<MetricTag.RequiredMetricTag> tags)
metric(String) builder instead.MetricTimer with the given name, and tags it with the given tags.
See Metrics.Builder.tags(Iterable) for more information about tag behaviour.
Ticker to stop the created and started MetricTimer@Deprecated @Nonnull public static Ticker startLongRunningTimer(String name)
metric(String) builder instead.LongRunningMetricTimer with the given name, and tags it with the given tags.Ticker to stop the created and started LongRunningMetricTimer@Deprecated @Nonnull public static Ticker startLongRunningTimer(String name, MetricTag.RequiredMetricTag... tags)
metric(String) builder instead.LongRunningMetricTimer with the given name, and tags it with the given tags.
See Metrics.Builder.tags(Iterable) for more information about tag behaviour.
Ticker to stop the created and started LongRunningMetricTimer@Deprecated @Nonnull public static Ticker startLongRunningTimer(String name, Collection<MetricTag.RequiredMetricTag> tags)
metric(String) builder instead.LongRunningMetricTimer with the given name, and tags it with the given tags.
See Metrics.Builder.tags(Iterable) for more information about tag behaviour.
Ticker to stop the created and started LongRunningMetricTimerpublic static Metrics.Builder metric(String name)
Metrics.Buildername - metric nameCopyright © 2023 Atlassian. All rights reserved.