Otel.SDK.Metrics.Stream (otel v0.2.0)

Copy Markdown View Source

A metric stream produced by matching a View to an Instrument.

Streams are the unit of metric output: each stream has a name, description, attribute filter, and references to its source instrument. Aggregation, exemplar reservoir, and cardinality limit fields are populated by resolve/1 from view config or spec defaults.

Summary

Types

t()

@type t() :: %Otel.SDK.Metrics.Stream{
  aggregation: module() | nil,
  aggregation_cardinality_limit: pos_integer() | nil,
  aggregation_options: map(),
  attribute_keys: {:include, [String.t()]} | {:exclude, [String.t()]} | nil,
  description: String.t(),
  exemplar_reservoir: module() | nil,
  instrument: Otel.API.Metrics.Instrument.t(),
  name: String.t(),
  reader_id: reference() | nil,
  temporality: Otel.API.Metrics.Instrument.temporality()
}

Functions

from_instrument(instrument)

@spec from_instrument(instrument :: Otel.API.Metrics.Instrument.t()) :: t()

from_view(view, instrument)

@spec from_view(
  view :: Otel.SDK.Metrics.View.t(),
  instrument :: Otel.API.Metrics.Instrument.t()
) :: t()

resolve(stream)

@spec resolve(stream :: t()) :: t()