Documentation ¶
Index ¶
Constants ¶
const DefaultAggregatorCardinalityLimit = 2000
DefaultAggregatorCardinalityLimit is a hard limit on the number of aggregators that can be emitted in a single period.
const DefaultAttributeSizeLimit = 8192
DefaultAttributeSizeLimit is the default limit for attribute value sizes that will be admitted without truncation.
const DefaultInactiveCollectionPeriods = 10
DefaultInactiveCollectionPeriods is how many collection periods to delay before removing records from memory.
const DefaultInstrumentCardinalityLimit = 3000
DefaultInstrumentCardinalityLimit is a hard limit on the number of aggregators that can be accumulated in intermediate state belonging to the instrument.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶
type Descriptor struct { // Name returns the metric instrument's name. Name string // Kind returns the specific kind of instrument. Kind Kind // NumberKind returns whether this instrument captures int64 // or float64 values. NumberKind number.Kind // Description provides a human-readable description of the metric. Description string // Unit describes the units of the metric instrument. Unitless // metrics return the empty string. Unit string }
Descriptor contains all the settings that describe an instrument, including its name, metric kind, number kind, and the configurable options.
func NewDescriptor ¶
NewDescriptor returns a Descriptor with the given contents.
type Kind ¶
type Kind int8
Kind describes the kind of instrument.
const ( // SyncCounter indicates a Counter instrument. SyncCounter Kind = iota // SyncUpDownCounter indicates a UpDownCounter instrument. SyncUpDownCounter // SyncHistogram indicates a Histogram instrument. SyncHistogram // AsyncCounter indicates an asynchronous Counter instrument. AsyncCounter // AsyncUpDownCounter indicates a UpDownCounterObserver // instrument. AsyncUpDownCounter // AsyncGauge indicates an GaugeObserver instrument. AsyncGauge // NumKinds is the size of an array, useful for indexing by instrument kind. NumKinds )
func (Kind) Synchronous ¶
Synchronous returns whether this is a synchronous kind of instrument.
type MeasurementProcessor ¶ added in v1.18.6
type MeasurementProcessor interface {
Process(ctx context.Context, inAttrs []attribute.KeyValue) (outAttrs []attribute.KeyValue)
}
MeasurementProcessor allows applications to extend metric events based on context.
type Performance ¶ added in v1.13.1
type Performance struct { // IgnoreCollisions indicates the user is willing to bypass an // attributes-set comparison after finding a fingerprint // match. IgnoreCollisions bool // InactiveCollectionPeriods is the number of allowed // collection periods having no updates before the record is // removed from memory. InactiveCollectionPeriods uint32 // InstrumentCardinalityLimit is the point at which the // SDK's emergency overflow breaker begins dropping attributes // to avoid memory buildup at intermediate pipeline stages. InstrumentCardinalityLimit uint32 // AggregatorCardinalityLimit is a hard limit on output // cardinality for all aggregators in the SDK. AggregatorCardinalityLimit uint32 // MeasurementProcessor supports modifying the attributes // based on context. Only applies to synchronous instruments. MeasurementProcessor MeasurementProcessor // AttributeSizeLimit is a byte-size limit on attribute keys, // string values, and each element of string-slice values. AttributeSizeLimit uint32 }
Performace configures features that allow the user to control performance.
func (Performance) TruncateAttributes ¶ added in v1.23.0
func (p Performance) TruncateAttributes(attrs []attribute.KeyValue) []attribute.KeyValue
func (Performance) Validate ¶ added in v1.13.2
func (p Performance) Validate() Performance
Validate returns a Performance object with 0 values replaced by defaults and errors checked.