Package io.sentry
Interface IMetricsAggregator
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
MetricsAggregator,NoopMetricsAggregator
-
Method Summary
Modifier and TypeMethodDescriptionvoiddistribution(@NotNull String key, double value, @Nullable MeasurementUnit unit, @Nullable Map<String, String> tags, long timestampMs, @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Distribution metricvoidflush(boolean force) voidgauge(@NotNull String key, double value, @Nullable MeasurementUnit unit, @Nullable Map<String, String> tags, long timestampMs, @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Gauge metricvoidincrement(@NotNull String key, double value, @Nullable MeasurementUnit unit, @Nullable Map<String, String> tags, long timestampMs, @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Counter metricvoidset(@NotNull String key, int value, @Nullable MeasurementUnit unit, @Nullable Map<String, String> tags, long timestampMs, @Nullable LocalMetricsAggregator localMetricsAggregator) Emits a Set metricvoidset(@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, seeMeasurementUnittags- 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, seeMeasurementUnittags- 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, seeMeasurementUnittags- 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, seeMeasurementUnittags- 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, seeMeasurementUnittags- 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)
-