Package io.sentry
Interface IMetricsAggregator
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
MetricsAggregator
,NoopMetricsAggregator
-
Method Summary
Modifier and TypeMethodDescriptionvoid
distribution
(@NotNull String key, double value, @Nullable MeasurementUnit unit, @Nullable Map<String, String> tags, long timestampMs, @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Distribution metricvoid
flush
(boolean force) void
gauge
(@NotNull String key, double value, @Nullable MeasurementUnit unit, @Nullable Map<String, String> tags, long timestampMs, @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Gauge metricvoid
increment
(@NotNull String key, double value, @Nullable MeasurementUnit unit, @Nullable Map<String, String> tags, long timestampMs, @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Counter metricvoid
set
(@NotNull String key, int value, @Nullable MeasurementUnit unit, @Nullable Map<String, String> tags, long timestampMs, @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Set metricvoid
set
(@NotNull String key, @NotNull String value, @Nullable MeasurementUnit unit, @Nullable Map<String, String> tags, long timestampMs, @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Set metric
-
Method Details
-
increment
void increment(@NotNull @NotNull String key, double value, @Nullable @Nullable MeasurementUnit unit, @Nullable @Nullable Map<String, String> tags, long timestampMs, @Nullable @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Counter metric- Parameters:
key
- A unique key identifying the metricvalue
- The value to be addedunit
- An optional unit, seeMeasurementUnit
tags
- Optional Tags to associate with the metrictimestampMs
- The time when the metric was emitted. Defaults to the time at which the metric is emitted, if no value is provided.localMetricsAggregator
- The local metrics aggregator for creating span summaries
-
gauge
void gauge(@NotNull @NotNull String key, double value, @Nullable @Nullable MeasurementUnit unit, @Nullable @Nullable Map<String, String> tags, long timestampMs, @Nullable @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Gauge metric- Parameters:
key
- A unique key identifying the metricvalue
- The value to be addedunit
- An optional unit, seeMeasurementUnit
tags
- Optional Tags to associate with the metrictimestampMs
- The time when the metric was emitted. Defaults to the time at which the metric is emitted, if no value is provided.localMetricsAggregator
- The local metrics aggregator for creating span summaries
-
distribution
void distribution(@NotNull @NotNull String key, double value, @Nullable @Nullable MeasurementUnit unit, @Nullable @Nullable Map<String, String> tags, long timestampMs, @Nullable @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Distribution metric- Parameters:
key
- A unique key identifying the metricvalue
- The value to be addedunit
- An optional unit, seeMeasurementUnit
tags
- Optional Tags to associate with the metrictimestampMs
- The time when the metric was emitted. Defaults to the time at which the metric is emitted, if no value is provided.localMetricsAggregator
- The local metrics aggregator for creating span summaries
-
set
void set(@NotNull @NotNull String key, int value, @Nullable @Nullable MeasurementUnit unit, @Nullable @Nullable Map<String, String> tags, long timestampMs, @Nullable @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Set metric- Parameters:
key
- A unique key identifying the metricvalue
- The value to be addedunit
- An optional unit, seeMeasurementUnit
tags
- Optional Tags to associate with the metrictimestampMs
- The time when the metric was emitted. Defaults to the time at which the metric is emitted, if no value is provided.localMetricsAggregator
- The local metrics aggregator for creating span summaries
-
set
void set(@NotNull @NotNull String key, @NotNull @NotNull String value, @Nullable @Nullable MeasurementUnit unit, @Nullable @Nullable Map<String, String> tags, long timestampMs, @Nullable @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Set metric- Parameters:
key
- A unique key identifying the metricvalue
- The value to be addedunit
- An optional unit, seeMeasurementUnit
tags
- Optional Tags to associate with the metrictimestampMs
- The time when the metric was emitted. Defaults to the time at which the metric is emitted, if no value is provided.localMetricsAggregator
- The local metrics aggregator for creating span summaries
-
flush
void flush(boolean force)
-