Sha256: c4a8a438997be323f30954c9d3fbcb480078b8c4d34a2a6fe706eae9f63bc774
Contents?: true
Size: 1.31 KB
Versions: 7
Compression:
Stored size: 1.31 KB
Contents
# frozen_string_literal: true # Copyright The OpenTelemetry Authors # # SPDX-License-Identifier: Apache-2.0 module OpenTelemetry module Metrics # In situations where performance is a requirement and a metric is # repeatedly used with the same labels, the developer may elect to # use instrument {Handles} as an optimization. For handles to be a benefit, # it requires that a specific instrument will be re-used with specific # labels. If an instrument will be used with the same labels more than # once, obtaining an instrument handle corresponding to the labels # ensures the highest performance available. # # To obtain a handle given an instrument and labels, use the #handle # method to return an interface that supports the #add or #record # method of the instrument in question. # # Instrument handles may consume SDK resources indefinitely. module Handles # A float counter handle. class FloatCounter def add(value); end end # An integer counter handle. class IntegerCounter def add(value); end end # A float measure handle. class FloatMeasure def record(value); end end # An integer measure handle. class IntegerMeasure def record(value); end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems