Package io.sentry

Interface IMetricsAggregator

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
MetricsAggregator, NoopMetricsAggregator

public interface IMetricsAggregator extends Closeable
  • 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 metric
      value - The value to be added
      unit - An optional unit, see MeasurementUnit
      tags - Optional Tags to associate with the metric
      timestampMs - 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 metric
      value - The value to be added
      unit - An optional unit, see MeasurementUnit
      tags - Optional Tags to associate with the metric
      timestampMs - 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 metric
      value - The value to be added
      unit - An optional unit, see MeasurementUnit
      tags - Optional Tags to associate with the metric
      timestampMs - 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 metric
      value - The value to be added
      unit - An optional unit, see MeasurementUnit
      tags - Optional Tags to associate with the metric
      timestampMs - 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 metric
      value - The value to be added
      unit - An optional unit, see MeasurementUnit
      tags - Optional Tags to associate with the metric
      timestampMs - 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)