class OpenCensus::Stats::Exemplar

Exemplars are example points that may be used to annotate aggregated Distribution values. They are metadata that gives information about a particular value added to a Distribution bucket.

Attributes

attachments[R]

Contextual information about the example value @return [Hash<String,String>]

time[R]

The observation (sampling) time of the above value @return [Time]

value[R]

Value of the exemplar point. It determines which bucket the exemplar belongs to @return [Integer,Float]

Public Class Methods

new(value:, time:, attachments: @value = value) click to toggle source

Create instance of the exemplar @param [Integer,Float] value @param [Time] time @param [Hash<String,String>] attachments. Attachments are key-value

pairs that describe the context in which the exemplar was recored.
# File lib/opencensus/stats/exemplar.rb, line 30
def initialize value:, time:, attachments:
  @value = value
  @time = time

  raise ArgumentError, "attachments can not be empty" if attachments.nil?

  @attachments = attachments
end