Documentation ¶
Index ¶
- Constants
- Variables
- type AggregationTemporality
- type DataPointFlags
- type Exemplar
- func (ms Exemplar) CopyTo(dest Exemplar)
- func (ms Exemplar) DoubleValue() float64
- func (ms Exemplar) FilteredAttributes() pcommon.Map
- func (ms Exemplar) IntValue() int64
- func (ms Exemplar) IsNil() bool
- func (ms Exemplar) MoveTo(dest Exemplar)
- func (ms Exemplar) SetDoubleValue(v float64)
- func (ms Exemplar) SetIntValue(v int64)
- func (ms Exemplar) SetSpanID(v pcommon.SpanID)
- func (ms Exemplar) SetTimestamp(v pcommon.Timestamp)
- func (ms Exemplar) SetTraceID(v pcommon.TraceID)
- func (ms Exemplar) SpanID() (pcommon.SpanID, bool)
- func (ms Exemplar) Timestamp() pcommon.Timestamp
- func (ms Exemplar) TraceID() (pcommon.TraceID, bool)
- func (ms Exemplar) ValueType() ExemplarValueType
- type ExemplarSlice
- func (es ExemplarSlice) AppendEmpty() Exemplar
- func (es ExemplarSlice) At(i int) Exemplar
- func (es ExemplarSlice) CopyTo(dest ExemplarSlice)
- func (es ExemplarSlice) EnsureCapacity(newCap int)
- func (es ExemplarSlice) Len() int
- func (es ExemplarSlice) MoveAndAppendTo(dest ExemplarSlice)
- func (es ExemplarSlice) RemoveIf(f func(Exemplar) bool)
- type ExemplarValueType
- type ExponentialHistogram
- func (ms ExponentialHistogram) AggregationTemporality() AggregationTemporality
- func (ms ExponentialHistogram) CopyTo(dest ExponentialHistogram)
- func (ms ExponentialHistogram) DataPoints() ExponentialHistogramDataPointSlice
- func (ms ExponentialHistogram) IsNil() bool
- func (ms ExponentialHistogram) MoveTo(dest ExponentialHistogram)
- func (ms ExponentialHistogram) SetAggregationTemporality(v AggregationTemporality)
- type ExponentialHistogramDataPoint
- func (ms ExponentialHistogramDataPoint) Attributes() pcommon.Map
- func (ms ExponentialHistogramDataPoint) CopyTo(dest ExponentialHistogramDataPoint)
- func (ms ExponentialHistogramDataPoint) Count() uint64
- func (ms ExponentialHistogramDataPoint) Exemplars() ExemplarSlice
- func (ms ExponentialHistogramDataPoint) Flags() DataPointFlags
- func (ms ExponentialHistogramDataPoint) HasMax() bool
- func (ms ExponentialHistogramDataPoint) HasMin() bool
- func (ms ExponentialHistogramDataPoint) HasSum() bool
- func (ms ExponentialHistogramDataPoint) IsNil() bool
- func (ms ExponentialHistogramDataPoint) Max() float64
- func (ms ExponentialHistogramDataPoint) Min() float64
- func (ms ExponentialHistogramDataPoint) MoveTo(dest ExponentialHistogramDataPoint)
- func (ms ExponentialHistogramDataPoint) Negative() ExponentialHistogramDataPointBuckets
- func (ms ExponentialHistogramDataPoint) Positive() ExponentialHistogramDataPointBuckets
- func (ms ExponentialHistogramDataPoint) RemoveMax()
- func (ms ExponentialHistogramDataPoint) RemoveMin()
- func (ms ExponentialHistogramDataPoint) RemoveSum()
- func (ms ExponentialHistogramDataPoint) Scale() int32
- func (ms ExponentialHistogramDataPoint) SetCount(v uint64)
- func (ms ExponentialHistogramDataPoint) SetFlags(v DataPointFlags)
- func (ms ExponentialHistogramDataPoint) SetMax(v float64)
- func (ms ExponentialHistogramDataPoint) SetMin(v float64)
- func (ms ExponentialHistogramDataPoint) SetScale(v int32)
- func (ms ExponentialHistogramDataPoint) SetStartTimestamp(v pcommon.Timestamp)
- func (ms ExponentialHistogramDataPoint) SetSum(v float64)
- func (ms ExponentialHistogramDataPoint) SetTimestamp(v pcommon.Timestamp)
- func (ms ExponentialHistogramDataPoint) SetZeroCount(v uint64)
- func (ms ExponentialHistogramDataPoint) SetZeroThreshold(v float64)
- func (ms ExponentialHistogramDataPoint) StartTimestamp() pcommon.Timestamp
- func (ms ExponentialHistogramDataPoint) Sum() float64
- func (ms ExponentialHistogramDataPoint) Timestamp() pcommon.Timestamp
- func (ms ExponentialHistogramDataPoint) ZeroCount() uint64
- func (ms ExponentialHistogramDataPoint) ZeroThreshold() float64
- type ExponentialHistogramDataPointBuckets
- func (ms ExponentialHistogramDataPointBuckets) BucketCounts() pcommon.UInt64Slice
- func (ms ExponentialHistogramDataPointBuckets) CopyTo(dest ExponentialHistogramDataPointBuckets)
- func (ms ExponentialHistogramDataPointBuckets) IsNil() bool
- func (ms ExponentialHistogramDataPointBuckets) MoveTo(dest ExponentialHistogramDataPointBuckets)
- func (ms ExponentialHistogramDataPointBuckets) Offset() int32
- func (ms ExponentialHistogramDataPointBuckets) SetOffset(v int32)
- type ExponentialHistogramDataPointSlice
- func (es ExponentialHistogramDataPointSlice) AppendEmpty() ExponentialHistogramDataPoint
- func (es ExponentialHistogramDataPointSlice) At(i int) ExponentialHistogramDataPoint
- func (es ExponentialHistogramDataPointSlice) CopyTo(dest ExponentialHistogramDataPointSlice)
- func (es ExponentialHistogramDataPointSlice) EnsureCapacity(newCap int)
- func (es ExponentialHistogramDataPointSlice) Len() int
- func (es ExponentialHistogramDataPointSlice) MoveAndAppendTo(dest ExponentialHistogramDataPointSlice)
- func (es ExponentialHistogramDataPointSlice) RemoveIf(f func(ExponentialHistogramDataPoint) bool)
- func (es ExponentialHistogramDataPointSlice) Sort(less func(a, b ExponentialHistogramDataPoint) bool)
- type Gauge
- type Histogram
- func (ms Histogram) AggregationTemporality() AggregationTemporality
- func (ms Histogram) CopyTo(dest Histogram)
- func (ms Histogram) DataPoints() HistogramDataPointSlice
- func (ms Histogram) IsNil() bool
- func (ms Histogram) MoveTo(dest Histogram)
- func (ms Histogram) SetAggregationTemporality(v AggregationTemporality)
- type HistogramDataPoint
- func (ms HistogramDataPoint) Attributes() pcommon.Map
- func (ms HistogramDataPoint) BucketCounts() pcommon.UInt64Slice
- func (ms HistogramDataPoint) CopyTo(dest HistogramDataPoint)
- func (ms HistogramDataPoint) Count() uint64
- func (ms HistogramDataPoint) Exemplars() ExemplarSlice
- func (ms HistogramDataPoint) ExplicitBounds() pcommon.Float64Slice
- func (ms HistogramDataPoint) Flags() DataPointFlags
- func (ms HistogramDataPoint) HasMax() bool
- func (ms HistogramDataPoint) HasMin() bool
- func (ms HistogramDataPoint) HasSum() bool
- func (ms HistogramDataPoint) IsNil() bool
- func (ms HistogramDataPoint) Max() float64
- func (ms HistogramDataPoint) Min() float64
- func (ms HistogramDataPoint) MoveTo(dest HistogramDataPoint)
- func (ms HistogramDataPoint) RemoveMax()
- func (ms HistogramDataPoint) RemoveMin()
- func (ms HistogramDataPoint) RemoveSum()
- func (ms HistogramDataPoint) SetCount(v uint64)
- func (ms HistogramDataPoint) SetFlags(v DataPointFlags)
- func (ms HistogramDataPoint) SetMax(v float64)
- func (ms HistogramDataPoint) SetMin(v float64)
- func (ms HistogramDataPoint) SetStartTimestamp(v pcommon.Timestamp)
- func (ms HistogramDataPoint) SetSum(v float64)
- func (ms HistogramDataPoint) SetTimestamp(v pcommon.Timestamp)
- func (ms HistogramDataPoint) StartTimestamp() pcommon.Timestamp
- func (ms HistogramDataPoint) Sum() float64
- func (ms HistogramDataPoint) Timestamp() pcommon.Timestamp
- type HistogramDataPointSlice
- func (es HistogramDataPointSlice) AppendEmpty() HistogramDataPoint
- func (es HistogramDataPointSlice) At(i int) HistogramDataPoint
- func (es HistogramDataPointSlice) CopyTo(dest HistogramDataPointSlice)
- func (es HistogramDataPointSlice) EnsureCapacity(newCap int)
- func (es HistogramDataPointSlice) Len() int
- func (es HistogramDataPointSlice) MoveAndAppendTo(dest HistogramDataPointSlice)
- func (es HistogramDataPointSlice) RemoveIf(f func(HistogramDataPoint) bool)
- func (es HistogramDataPointSlice) Sort(less func(a, b HistogramDataPoint) bool)
- type JSONMarshaler
- type JSONUnmarshaler
- type MarshalSizer
- type Marshaler
- type Metric
- func (ms Metric) CopyTo(dest Metric)
- func (ms Metric) Description() string
- func (ms Metric) ExponentialHistogram() ExponentialHistogram
- func (ms Metric) Gauge() Gauge
- func (ms Metric) Histogram() Histogram
- func (ms Metric) IsNil() bool
- func (ms Metric) Metadata() pcommon.Map
- func (ms Metric) MoveTo(dest Metric)
- func (ms Metric) Name() string
- func (ms Metric) SetDescription(v string)
- func (ms Metric) SetEmptyExponentialHistogram() ExponentialHistogram
- func (ms Metric) SetEmptyGauge() Gauge
- func (ms Metric) SetEmptyHistogram() Histogram
- func (ms Metric) SetEmptySum() Sum
- func (ms Metric) SetEmptySummary() Summary
- func (ms Metric) SetName(v string)
- func (ms Metric) SetUnit(v string)
- func (ms Metric) Sum() Sum
- func (ms Metric) Summary() Summary
- func (ms Metric) Type() MetricType
- func (ms Metric) Unit() string
- type MetricSlice
- func (es MetricSlice) AppendEmpty() Metric
- func (es MetricSlice) At(i int) Metric
- func (es MetricSlice) CopyTo(dest MetricSlice)
- func (es MetricSlice) EnsureCapacity(newCap int)
- func (es MetricSlice) Len() int
- func (es MetricSlice) MoveAndAppendTo(dest MetricSlice)
- func (es MetricSlice) RemoveIf(f func(Metric) bool)
- func (es MetricSlice) Sort(less func(a, b Metric) bool)
- type MetricType
- type Metrics
- type NumberDataPoint
- func (ms NumberDataPoint) Attributes() pcommon.Map
- func (ms NumberDataPoint) CopyTo(dest NumberDataPoint)
- func (ms NumberDataPoint) DoubleValue() float64
- func (ms NumberDataPoint) Exemplars() ExemplarSlice
- func (ms NumberDataPoint) Flags() DataPointFlags
- func (ms NumberDataPoint) IntValue() int64
- func (ms NumberDataPoint) IsNil() bool
- func (ms NumberDataPoint) MoveTo(dest NumberDataPoint)
- func (ms NumberDataPoint) SetDoubleValue(v float64)
- func (ms NumberDataPoint) SetFlags(v DataPointFlags)
- func (ms NumberDataPoint) SetIntValue(v int64)
- func (ms NumberDataPoint) SetStartTimestamp(v pcommon.Timestamp)
- func (ms NumberDataPoint) SetTimestamp(v pcommon.Timestamp)
- func (ms NumberDataPoint) StartTimestamp() pcommon.Timestamp
- func (ms NumberDataPoint) Timestamp() pcommon.Timestamp
- func (ms NumberDataPoint) ValueType() NumberDataPointValueType
- type NumberDataPointSlice
- func (es NumberDataPointSlice) AppendEmpty() NumberDataPoint
- func (es NumberDataPointSlice) At(i int) NumberDataPoint
- func (es NumberDataPointSlice) CopyTo(dest NumberDataPointSlice)
- func (es NumberDataPointSlice) EnsureCapacity(newCap int)
- func (es NumberDataPointSlice) Len() int
- func (es NumberDataPointSlice) MoveAndAppendTo(dest NumberDataPointSlice)
- func (es NumberDataPointSlice) RemoveIf(f func(NumberDataPoint) bool)
- func (es NumberDataPointSlice) Sort(less func(a, b NumberDataPoint) bool)
- type NumberDataPointValueType
- type ProtoMarshaler
- type ProtoUnmarshaler
- type ResourceMetrics
- func (ms ResourceMetrics) CopyTo(dest ResourceMetrics)
- func (ms ResourceMetrics) IsNil() bool
- func (ms ResourceMetrics) MoveTo(dest ResourceMetrics)
- func (ms ResourceMetrics) Resource() pcommon.Resource
- func (ms ResourceMetrics) SchemaUrl() string
- func (ms ResourceMetrics) ScopeMetrics() ScopeMetricsSlice
- func (ms ResourceMetrics) SetSchemaUrl(v string)
- type ResourceMetricsSlice
- func (es ResourceMetricsSlice) AppendEmpty() ResourceMetrics
- func (es ResourceMetricsSlice) At(i int) ResourceMetrics
- func (es ResourceMetricsSlice) CopyTo(dest ResourceMetricsSlice)
- func (es ResourceMetricsSlice) EnsureCapacity(newCap int)
- func (es ResourceMetricsSlice) Len() int
- func (es ResourceMetricsSlice) MoveAndAppendTo(dest ResourceMetricsSlice)
- func (es ResourceMetricsSlice) RemoveIf(f func(ResourceMetrics) bool)
- func (es ResourceMetricsSlice) Sort(less func(a, b ResourceMetrics) bool)
- type ScopeMetrics
- func (ms ScopeMetrics) CopyTo(dest ScopeMetrics)
- func (ms ScopeMetrics) IsNil() bool
- func (ms ScopeMetrics) Metrics() MetricSlice
- func (ms ScopeMetrics) MoveTo(dest ScopeMetrics)
- func (ms ScopeMetrics) SchemaUrl() string
- func (ms ScopeMetrics) Scope() pcommon.InstrumentationScope
- func (ms ScopeMetrics) SetSchemaUrl(v string)
- type ScopeMetricsSlice
- func (es ScopeMetricsSlice) AppendEmpty() ScopeMetrics
- func (es ScopeMetricsSlice) At(i int) ScopeMetrics
- func (es ScopeMetricsSlice) CopyTo(dest ScopeMetricsSlice)
- func (es ScopeMetricsSlice) EnsureCapacity(newCap int)
- func (es ScopeMetricsSlice) Len() int
- func (es ScopeMetricsSlice) MoveAndAppendTo(dest ScopeMetricsSlice)
- func (es ScopeMetricsSlice) RemoveIf(f func(ScopeMetrics) bool)
- func (es ScopeMetricsSlice) Sort(less func(a, b ScopeMetrics) bool)
- type Sizer
- type Sum
- func (ms Sum) AggregationTemporality() AggregationTemporality
- func (ms Sum) CopyTo(dest Sum)
- func (ms Sum) DataPoints() NumberDataPointSlice
- func (ms Sum) IsMonotonic() bool
- func (ms Sum) IsNil() bool
- func (ms Sum) MoveTo(dest Sum)
- func (ms Sum) SetAggregationTemporality(v AggregationTemporality)
- func (ms Sum) SetIsMonotonic(v bool)
- type Summary
- type SummaryDataPoint
- func (ms SummaryDataPoint) Attributes() pcommon.Map
- func (ms SummaryDataPoint) CopyTo(dest SummaryDataPoint)
- func (ms SummaryDataPoint) Count() uint64
- func (ms SummaryDataPoint) Flags() DataPointFlags
- func (ms SummaryDataPoint) IsNil() bool
- func (ms SummaryDataPoint) MoveTo(dest SummaryDataPoint)
- func (ms SummaryDataPoint) QuantileValues() SummaryDataPointValueAtQuantileSlice
- func (ms SummaryDataPoint) SetCount(v uint64)
- func (ms SummaryDataPoint) SetFlags(v DataPointFlags)
- func (ms SummaryDataPoint) SetStartTimestamp(v pcommon.Timestamp)
- func (ms SummaryDataPoint) SetSum(v float64)
- func (ms SummaryDataPoint) SetTimestamp(v pcommon.Timestamp)
- func (ms SummaryDataPoint) StartTimestamp() pcommon.Timestamp
- func (ms SummaryDataPoint) Sum() float64
- func (ms SummaryDataPoint) Timestamp() pcommon.Timestamp
- type SummaryDataPointSlice
- func (es SummaryDataPointSlice) AppendEmpty() SummaryDataPoint
- func (es SummaryDataPointSlice) At(i int) SummaryDataPoint
- func (es SummaryDataPointSlice) CopyTo(dest SummaryDataPointSlice)
- func (es SummaryDataPointSlice) EnsureCapacity(newCap int)
- func (es SummaryDataPointSlice) Len() int
- func (es SummaryDataPointSlice) MoveAndAppendTo(dest SummaryDataPointSlice)
- func (es SummaryDataPointSlice) RemoveIf(f func(SummaryDataPoint) bool)
- func (es SummaryDataPointSlice) Sort(less func(a, b SummaryDataPoint) bool)
- type SummaryDataPointValueAtQuantile
- func (ms SummaryDataPointValueAtQuantile) CopyTo(dest SummaryDataPointValueAtQuantile)
- func (ms SummaryDataPointValueAtQuantile) IsNil() bool
- func (ms SummaryDataPointValueAtQuantile) MoveTo(dest SummaryDataPointValueAtQuantile)
- func (ms SummaryDataPointValueAtQuantile) Quantile() float64
- func (ms SummaryDataPointValueAtQuantile) SetQuantile(v float64)
- func (ms SummaryDataPointValueAtQuantile) SetValue(v float64)
- func (ms SummaryDataPointValueAtQuantile) Value() float64
- type SummaryDataPointValueAtQuantileSlice
- func (es SummaryDataPointValueAtQuantileSlice) AppendEmpty() SummaryDataPointValueAtQuantile
- func (es SummaryDataPointValueAtQuantileSlice) At(i int) SummaryDataPointValueAtQuantile
- func (es SummaryDataPointValueAtQuantileSlice) CopyTo(dest SummaryDataPointValueAtQuantileSlice)
- func (es SummaryDataPointValueAtQuantileSlice) EnsureCapacity(newCap int)
- func (es SummaryDataPointValueAtQuantileSlice) Len() int
- func (es SummaryDataPointValueAtQuantileSlice) MoveAndAppendTo(dest SummaryDataPointValueAtQuantileSlice)
- func (es SummaryDataPointValueAtQuantileSlice) RemoveIf(f func(SummaryDataPointValueAtQuantile) bool)
- func (es SummaryDataPointValueAtQuantileSlice) Sort(less func(a, b SummaryDataPointValueAtQuantile) bool)
- type Unmarshaler
Constants ¶
const ( // AggregationTemporalityUnspecified is the default AggregationTemporality, it MUST NOT be used. AggregationTemporalityUnspecified = AggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED) // AggregationTemporalityDelta is a AggregationTemporality for a metric aggregator which reports changes since last report time. AggregationTemporalityDelta = AggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA) // AggregationTemporalityCumulative is a AggregationTemporality for a metric aggregator which reports changes since a fixed start time. AggregationTemporalityCumulative = AggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE) )
Variables ¶
var DefaultDataPointFlags = DataPointFlags(0)
Functions ¶
This section is empty.
Types ¶
type AggregationTemporality ¶
type AggregationTemporality int32
AggregationTemporality defines how a metric aggregator reports aggregated values. It describes how those values relate to the time interval over which they are aggregated.
func (AggregationTemporality) String ¶
func (at AggregationTemporality) String() string
String returns the string representation of the AggregationTemporality.
type DataPointFlags ¶
type DataPointFlags uint32
DataPointFlags defines how a metric aggregator reports aggregated values. It describes how those values relate to the time interval over which they are aggregated.
func (DataPointFlags) NoRecordedValue ¶
func (ms DataPointFlags) NoRecordedValue() bool
NoRecordedValue returns true if the DataPointFlags contains the NoRecordedValue flag.
func (DataPointFlags) WithNoRecordedValue ¶
func (ms DataPointFlags) WithNoRecordedValue(b bool) DataPointFlags
WithNoRecordedValue returns a new DataPointFlags, with the NoRecordedValue flag set to the given value.
type Exemplar ¶
type Exemplar struct {
// contains filtered or unexported fields
}
Exemplar is a sample input double measurement.
Exemplars also hold information about the environment when the measurement was recorded, for example the span and trace ID of the active span when the exemplar was recorded.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewExemplar function to create new instances. Important: zero-initialized instance is not valid for use.
func NewExemplar ¶
func NewExemplar() Exemplar
NewExemplar creates a new empty Exemplar.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Exemplar) CopyTo ¶
CopyTo copies all properties from the current struct overriding the destination.
func (Exemplar) DoubleValue ¶
DoubleValue returns the double associated with this Exemplar.
func (Exemplar) FilteredAttributes ¶
FilteredAttributes returns the FilteredAttributes associated with this Exemplar.
func (Exemplar) MoveTo ¶
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (Exemplar) SetDoubleValue ¶
SetDoubleValue replaces the double associated with this Exemplar.
func (Exemplar) SetIntValue ¶
SetIntValue replaces the int associated with this Exemplar.
func (Exemplar) SetTimestamp ¶
SetTimestamp replaces the timestamp associated with this Exemplar.
func (Exemplar) SetTraceID ¶
SetTraceID replaces the traceid associated with this Exemplar.
func (Exemplar) SpanID ¶
SpanID returns the spanid associated with this Exemplar. Returns the span ID and whether it exists.
func (Exemplar) ValueType ¶
func (ms Exemplar) ValueType() ExemplarValueType
ValueType returns the type of the value for this Exemplar. Calling this function on zero-initialized Exemplar will cause a panic.
type ExemplarSlice ¶
type ExemplarSlice struct {
// contains filtered or unexported fields
}
ExemplarSlice logically represents a slice of Exemplar.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewExemplarSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewExemplarSlice ¶
func NewExemplarSlice() ExemplarSlice
NewExemplarSlice creates a ExemplarSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (ExemplarSlice) AppendEmpty ¶
func (es ExemplarSlice) AppendEmpty() Exemplar
AppendEmpty will append to the end of the slice an empty Exemplar. It returns the newly added Exemplar.
func (ExemplarSlice) At ¶
func (es ExemplarSlice) At(i int) Exemplar
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (ExemplarSlice) CopyTo ¶
func (es ExemplarSlice) CopyTo(dest ExemplarSlice)
CopyTo copies all elements from the current slice overriding the destination.
func (ExemplarSlice) EnsureCapacity ¶
func (es ExemplarSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new ExemplarSlice can be initialized:
es := NewExemplarSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (ExemplarSlice) Len ¶
func (es ExemplarSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewExemplarSlice()".
func (ExemplarSlice) MoveAndAppendTo ¶
func (es ExemplarSlice) MoveAndAppendTo(dest ExemplarSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (ExemplarSlice) RemoveIf ¶
func (es ExemplarSlice) RemoveIf(f func(Exemplar) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
type ExemplarValueType ¶
type ExemplarValueType int32
ExemplarValueType specifies the type of Exemplar measurement value.
const ( // ExemplarValueTypeEmpty means that exemplar value is unset. ExemplarValueTypeEmpty ExemplarValueType = iota ExemplarValueTypeInt ExemplarValueTypeDouble )
func (ExemplarValueType) String ¶
func (nt ExemplarValueType) String() string
String returns the string representation of the ExemplarValueType.
type ExponentialHistogram ¶
type ExponentialHistogram struct {
// contains filtered or unexported fields
}
ExponentialHistogram represents the type of a metric that is calculated by aggregating as a ExponentialHistogram of all reported double measurements over a time interval.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewExponentialHistogram function to create new instances. Important: zero-initialized instance is not valid for use.
func NewExponentialHistogram ¶
func NewExponentialHistogram() ExponentialHistogram
NewExponentialHistogram creates a new empty ExponentialHistogram.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (ExponentialHistogram) AggregationTemporality ¶
func (ms ExponentialHistogram) AggregationTemporality() AggregationTemporality
AggregationTemporality returns the aggregationtemporality associated with this ExponentialHistogram.
func (ExponentialHistogram) CopyTo ¶
func (ms ExponentialHistogram) CopyTo(dest ExponentialHistogram)
CopyTo copies all properties from the current struct overriding the destination.
func (ExponentialHistogram) DataPoints ¶
func (ms ExponentialHistogram) DataPoints() ExponentialHistogramDataPointSlice
DataPoints returns the DataPoints associated with this ExponentialHistogram.
func (ExponentialHistogram) IsNil ¶
func (ms ExponentialHistogram) IsNil() bool
IsNil returns whether the struct is nil value.
func (ExponentialHistogram) MoveTo ¶
func (ms ExponentialHistogram) MoveTo(dest ExponentialHistogram)
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (ExponentialHistogram) SetAggregationTemporality ¶
func (ms ExponentialHistogram) SetAggregationTemporality(v AggregationTemporality)
SetAggregationTemporality replaces the aggregationtemporality associated with this ExponentialHistogram.
type ExponentialHistogramDataPoint ¶
type ExponentialHistogramDataPoint struct {
// contains filtered or unexported fields
}
ExponentialHistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains summary statistics for a population of values, it may optionally contain the distribution of those values across a set of buckets.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewExponentialHistogramDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewExponentialHistogramDataPoint ¶
func NewExponentialHistogramDataPoint() ExponentialHistogramDataPoint
NewExponentialHistogramDataPoint creates a new empty ExponentialHistogramDataPoint.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (ExponentialHistogramDataPoint) Attributes ¶
func (ms ExponentialHistogramDataPoint) Attributes() pcommon.Map
Attributes returns the Attributes associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) CopyTo ¶
func (ms ExponentialHistogramDataPoint) CopyTo(dest ExponentialHistogramDataPoint)
CopyTo copies all properties from the current struct overriding the destination.
func (ExponentialHistogramDataPoint) Count ¶
func (ms ExponentialHistogramDataPoint) Count() uint64
Count returns the count associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Exemplars ¶
func (ms ExponentialHistogramDataPoint) Exemplars() ExemplarSlice
Exemplars returns the Exemplars associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Flags ¶
func (ms ExponentialHistogramDataPoint) Flags() DataPointFlags
Flags returns the flags associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) HasMax ¶
func (ms ExponentialHistogramDataPoint) HasMax() bool
HasMax returns true if the ExponentialHistogramDataPoint contains a Max value, false otherwise.
func (ExponentialHistogramDataPoint) HasMin ¶
func (ms ExponentialHistogramDataPoint) HasMin() bool
HasMin returns true if the ExponentialHistogramDataPoint contains a Min value, false otherwise.
func (ExponentialHistogramDataPoint) HasSum ¶
func (ms ExponentialHistogramDataPoint) HasSum() bool
HasSum returns true if the ExponentialHistogramDataPoint contains a Sum value, false otherwise.
func (ExponentialHistogramDataPoint) IsNil ¶
func (ms ExponentialHistogramDataPoint) IsNil() bool
IsNil returns whether the struct is nil value.
func (ExponentialHistogramDataPoint) Max ¶
func (ms ExponentialHistogramDataPoint) Max() float64
Max returns the max associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Min ¶
func (ms ExponentialHistogramDataPoint) Min() float64
Min returns the min associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) MoveTo ¶
func (ms ExponentialHistogramDataPoint) MoveTo(dest ExponentialHistogramDataPoint)
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (ExponentialHistogramDataPoint) Negative ¶
func (ms ExponentialHistogramDataPoint) Negative() ExponentialHistogramDataPointBuckets
Negative returns the negative associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Positive ¶
func (ms ExponentialHistogramDataPoint) Positive() ExponentialHistogramDataPointBuckets
Positive returns the positive associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) RemoveMax ¶
func (ms ExponentialHistogramDataPoint) RemoveMax()
RemoveMax removes the max associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) RemoveMin ¶
func (ms ExponentialHistogramDataPoint) RemoveMin()
RemoveMin removes the min associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) RemoveSum ¶
func (ms ExponentialHistogramDataPoint) RemoveSum()
RemoveSum removes the sum associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Scale ¶
func (ms ExponentialHistogramDataPoint) Scale() int32
Scale returns the scale associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetCount ¶
func (ms ExponentialHistogramDataPoint) SetCount(v uint64)
SetCount replaces the count associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetFlags ¶
func (ms ExponentialHistogramDataPoint) SetFlags(v DataPointFlags)
SetFlags replaces the flags associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetMax ¶
func (ms ExponentialHistogramDataPoint) SetMax(v float64)
SetMax replaces the max associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetMin ¶
func (ms ExponentialHistogramDataPoint) SetMin(v float64)
SetMin replaces the min associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetScale ¶
func (ms ExponentialHistogramDataPoint) SetScale(v int32)
SetScale replaces the scale associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetStartTimestamp ¶
func (ms ExponentialHistogramDataPoint) SetStartTimestamp(v pcommon.Timestamp)
SetStartTimestamp replaces the starttimestamp associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetSum ¶
func (ms ExponentialHistogramDataPoint) SetSum(v float64)
SetSum replaces the sum associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetTimestamp ¶
func (ms ExponentialHistogramDataPoint) SetTimestamp(v pcommon.Timestamp)
SetTimestamp replaces the timestamp associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetZeroCount ¶
func (ms ExponentialHistogramDataPoint) SetZeroCount(v uint64)
SetZeroCount replaces the zerocount associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetZeroThreshold ¶
func (ms ExponentialHistogramDataPoint) SetZeroThreshold(v float64)
SetZeroThreshold replaces the zerothreshold associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) StartTimestamp ¶
func (ms ExponentialHistogramDataPoint) StartTimestamp() pcommon.Timestamp
StartTimestamp returns the starttimestamp associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Sum ¶
func (ms ExponentialHistogramDataPoint) Sum() float64
Sum returns the sum associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Timestamp ¶
func (ms ExponentialHistogramDataPoint) Timestamp() pcommon.Timestamp
Timestamp returns the timestamp associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) ZeroCount ¶
func (ms ExponentialHistogramDataPoint) ZeroCount() uint64
ZeroCount returns the zerocount associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) ZeroThreshold ¶
func (ms ExponentialHistogramDataPoint) ZeroThreshold() float64
ZeroThreshold returns the zerothreshold associated with this ExponentialHistogramDataPoint.
type ExponentialHistogramDataPointBuckets ¶
type ExponentialHistogramDataPointBuckets struct {
// contains filtered or unexported fields
}
ExponentialHistogramDataPointBuckets are a set of bucket counts, encoded in a contiguous array of counts.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewExponentialHistogramDataPointBuckets function to create new instances. Important: zero-initialized instance is not valid for use.
func NewExponentialHistogramDataPointBuckets ¶
func NewExponentialHistogramDataPointBuckets() ExponentialHistogramDataPointBuckets
NewExponentialHistogramDataPointBuckets creates a new empty ExponentialHistogramDataPointBuckets.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (ExponentialHistogramDataPointBuckets) BucketCounts ¶
func (ms ExponentialHistogramDataPointBuckets) BucketCounts() pcommon.UInt64Slice
BucketCounts returns the bucketcounts associated with this ExponentialHistogramDataPointBuckets.
func (ExponentialHistogramDataPointBuckets) CopyTo ¶
func (ms ExponentialHistogramDataPointBuckets) CopyTo(dest ExponentialHistogramDataPointBuckets)
CopyTo copies all properties from the current struct overriding the destination.
func (ExponentialHistogramDataPointBuckets) IsNil ¶
func (ms ExponentialHistogramDataPointBuckets) IsNil() bool
IsNil returns whether the struct is nil value.
func (ExponentialHistogramDataPointBuckets) MoveTo ¶
func (ms ExponentialHistogramDataPointBuckets) MoveTo(dest ExponentialHistogramDataPointBuckets)
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (ExponentialHistogramDataPointBuckets) Offset ¶
func (ms ExponentialHistogramDataPointBuckets) Offset() int32
Offset returns the offset associated with this ExponentialHistogramDataPointBuckets.
func (ExponentialHistogramDataPointBuckets) SetOffset ¶
func (ms ExponentialHistogramDataPointBuckets) SetOffset(v int32)
SetOffset replaces the offset associated with this ExponentialHistogramDataPointBuckets.
type ExponentialHistogramDataPointSlice ¶
type ExponentialHistogramDataPointSlice struct {
// contains filtered or unexported fields
}
ExponentialHistogramDataPointSlice logically represents a slice of ExponentialHistogramDataPoint.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewExponentialHistogramDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewExponentialHistogramDataPointSlice ¶
func NewExponentialHistogramDataPointSlice() ExponentialHistogramDataPointSlice
NewExponentialHistogramDataPointSlice creates a ExponentialHistogramDataPointSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (ExponentialHistogramDataPointSlice) AppendEmpty ¶
func (es ExponentialHistogramDataPointSlice) AppendEmpty() ExponentialHistogramDataPoint
AppendEmpty will append to the end of the slice an empty ExponentialHistogramDataPoint. It returns the newly added ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPointSlice) At ¶
func (es ExponentialHistogramDataPointSlice) At(i int) ExponentialHistogramDataPoint
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (ExponentialHistogramDataPointSlice) CopyTo ¶
func (es ExponentialHistogramDataPointSlice) CopyTo(dest ExponentialHistogramDataPointSlice)
CopyTo copies all elements from the current slice overriding the destination.
func (ExponentialHistogramDataPointSlice) EnsureCapacity ¶
func (es ExponentialHistogramDataPointSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new ExponentialHistogramDataPointSlice can be initialized:
es := NewExponentialHistogramDataPointSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (ExponentialHistogramDataPointSlice) Len ¶
func (es ExponentialHistogramDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewExponentialHistogramDataPointSlice()".
func (ExponentialHistogramDataPointSlice) MoveAndAppendTo ¶
func (es ExponentialHistogramDataPointSlice) MoveAndAppendTo(dest ExponentialHistogramDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (ExponentialHistogramDataPointSlice) RemoveIf ¶
func (es ExponentialHistogramDataPointSlice) RemoveIf(f func(ExponentialHistogramDataPoint) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (ExponentialHistogramDataPointSlice) Sort ¶
func (es ExponentialHistogramDataPointSlice) Sort(less func(a, b ExponentialHistogramDataPoint) bool)
Sort sorts the ExponentialHistogramDataPoint elements within ExponentialHistogramDataPointSlice given the provided less function so that two instances of ExponentialHistogramDataPointSlice can be compared.
type Gauge ¶
type Gauge struct {
// contains filtered or unexported fields
}
Gauge represents the type of a numeric metric that always exports the "current value" for every data point.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewGauge function to create new instances. Important: zero-initialized instance is not valid for use.
func NewGauge ¶
func NewGauge() Gauge
NewGauge creates a new empty Gauge.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Gauge) CopyTo ¶
CopyTo copies all properties from the current struct overriding the destination.
func (Gauge) DataPoints ¶
func (ms Gauge) DataPoints() NumberDataPointSlice
DataPoints returns the DataPoints associated with this Gauge.
type Histogram ¶
type Histogram struct {
// contains filtered or unexported fields
}
Histogram represents the type of a metric that is calculated by aggregating as a Histogram of all reported measurements over a time interval.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewHistogram function to create new instances. Important: zero-initialized instance is not valid for use.
func NewHistogram ¶
func NewHistogram() Histogram
NewHistogram creates a new empty Histogram.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Histogram) AggregationTemporality ¶
func (ms Histogram) AggregationTemporality() AggregationTemporality
AggregationTemporality returns the aggregationtemporality associated with this Histogram.
func (Histogram) CopyTo ¶
CopyTo copies all properties from the current struct overriding the destination.
func (Histogram) DataPoints ¶
func (ms Histogram) DataPoints() HistogramDataPointSlice
DataPoints returns the DataPoints associated with this Histogram.
func (Histogram) MoveTo ¶
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (Histogram) SetAggregationTemporality ¶
func (ms Histogram) SetAggregationTemporality(v AggregationTemporality)
SetAggregationTemporality replaces the aggregationtemporality associated with this Histogram.
type HistogramDataPoint ¶
type HistogramDataPoint struct {
// contains filtered or unexported fields
}
HistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a Histogram of values.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewHistogramDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewHistogramDataPoint ¶
func NewHistogramDataPoint() HistogramDataPoint
NewHistogramDataPoint creates a new empty HistogramDataPoint.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (HistogramDataPoint) Attributes ¶
func (ms HistogramDataPoint) Attributes() pcommon.Map
Attributes returns the Attributes associated with this HistogramDataPoint.
func (HistogramDataPoint) BucketCounts ¶
func (ms HistogramDataPoint) BucketCounts() pcommon.UInt64Slice
BucketCounts returns the bucketcounts associated with this HistogramDataPoint.
func (HistogramDataPoint) CopyTo ¶
func (ms HistogramDataPoint) CopyTo(dest HistogramDataPoint)
CopyTo copies all properties from the current struct overriding the destination.
func (HistogramDataPoint) Count ¶
func (ms HistogramDataPoint) Count() uint64
Count returns the count associated with this HistogramDataPoint.
func (HistogramDataPoint) Exemplars ¶
func (ms HistogramDataPoint) Exemplars() ExemplarSlice
Exemplars returns the Exemplars associated with this HistogramDataPoint.
func (HistogramDataPoint) ExplicitBounds ¶
func (ms HistogramDataPoint) ExplicitBounds() pcommon.Float64Slice
ExplicitBounds returns the explicitbounds associated with this HistogramDataPoint.
func (HistogramDataPoint) Flags ¶
func (ms HistogramDataPoint) Flags() DataPointFlags
Flags returns the flags associated with this HistogramDataPoint.
func (HistogramDataPoint) HasMax ¶
func (ms HistogramDataPoint) HasMax() bool
HasMax returns true if the HistogramDataPoint contains a Max value, false otherwise.
func (HistogramDataPoint) HasMin ¶
func (ms HistogramDataPoint) HasMin() bool
HasMin returns true if the HistogramDataPoint contains a Min value, false otherwise.
func (HistogramDataPoint) HasSum ¶
func (ms HistogramDataPoint) HasSum() bool
HasSum returns true if the HistogramDataPoint contains a Sum value, false otherwise.
func (HistogramDataPoint) IsNil ¶
func (ms HistogramDataPoint) IsNil() bool
IsNil returns whether the struct is nil value.
func (HistogramDataPoint) Max ¶
func (ms HistogramDataPoint) Max() float64
Max returns the max associated with this HistogramDataPoint.
func (HistogramDataPoint) Min ¶
func (ms HistogramDataPoint) Min() float64
Min returns the min associated with this HistogramDataPoint.
func (HistogramDataPoint) MoveTo ¶
func (ms HistogramDataPoint) MoveTo(dest HistogramDataPoint)
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (HistogramDataPoint) RemoveMax ¶
func (ms HistogramDataPoint) RemoveMax()
RemoveMax removes the max associated with this HistogramDataPoint.
func (HistogramDataPoint) RemoveMin ¶
func (ms HistogramDataPoint) RemoveMin()
RemoveMin removes the min associated with this HistogramDataPoint.
func (HistogramDataPoint) RemoveSum ¶
func (ms HistogramDataPoint) RemoveSum()
RemoveSum removes the sum associated with this HistogramDataPoint.
func (HistogramDataPoint) SetCount ¶
func (ms HistogramDataPoint) SetCount(v uint64)
SetCount replaces the count associated with this HistogramDataPoint.
func (HistogramDataPoint) SetFlags ¶
func (ms HistogramDataPoint) SetFlags(v DataPointFlags)
SetFlags replaces the flags associated with this HistogramDataPoint.
func (HistogramDataPoint) SetMax ¶
func (ms HistogramDataPoint) SetMax(v float64)
SetMax replaces the max associated with this HistogramDataPoint.
func (HistogramDataPoint) SetMin ¶
func (ms HistogramDataPoint) SetMin(v float64)
SetMin replaces the min associated with this HistogramDataPoint.
func (HistogramDataPoint) SetStartTimestamp ¶
func (ms HistogramDataPoint) SetStartTimestamp(v pcommon.Timestamp)
SetStartTimestamp replaces the starttimestamp associated with this HistogramDataPoint.
func (HistogramDataPoint) SetSum ¶
func (ms HistogramDataPoint) SetSum(v float64)
SetSum replaces the sum associated with this HistogramDataPoint.
func (HistogramDataPoint) SetTimestamp ¶
func (ms HistogramDataPoint) SetTimestamp(v pcommon.Timestamp)
SetTimestamp replaces the timestamp associated with this HistogramDataPoint.
func (HistogramDataPoint) StartTimestamp ¶
func (ms HistogramDataPoint) StartTimestamp() pcommon.Timestamp
StartTimestamp returns the starttimestamp associated with this HistogramDataPoint.
func (HistogramDataPoint) Sum ¶
func (ms HistogramDataPoint) Sum() float64
Sum returns the sum associated with this HistogramDataPoint.
func (HistogramDataPoint) Timestamp ¶
func (ms HistogramDataPoint) Timestamp() pcommon.Timestamp
Timestamp returns the timestamp associated with this HistogramDataPoint.
type HistogramDataPointSlice ¶
type HistogramDataPointSlice struct {
// contains filtered or unexported fields
}
HistogramDataPointSlice logically represents a slice of HistogramDataPoint.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewHistogramDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewHistogramDataPointSlice ¶
func NewHistogramDataPointSlice() HistogramDataPointSlice
NewHistogramDataPointSlice creates a HistogramDataPointSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (HistogramDataPointSlice) AppendEmpty ¶
func (es HistogramDataPointSlice) AppendEmpty() HistogramDataPoint
AppendEmpty will append to the end of the slice an empty HistogramDataPoint. It returns the newly added HistogramDataPoint.
func (HistogramDataPointSlice) At ¶
func (es HistogramDataPointSlice) At(i int) HistogramDataPoint
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (HistogramDataPointSlice) CopyTo ¶
func (es HistogramDataPointSlice) CopyTo(dest HistogramDataPointSlice)
CopyTo copies all elements from the current slice overriding the destination.
func (HistogramDataPointSlice) EnsureCapacity ¶
func (es HistogramDataPointSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new HistogramDataPointSlice can be initialized:
es := NewHistogramDataPointSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (HistogramDataPointSlice) Len ¶
func (es HistogramDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewHistogramDataPointSlice()".
func (HistogramDataPointSlice) MoveAndAppendTo ¶
func (es HistogramDataPointSlice) MoveAndAppendTo(dest HistogramDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (HistogramDataPointSlice) RemoveIf ¶
func (es HistogramDataPointSlice) RemoveIf(f func(HistogramDataPoint) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (HistogramDataPointSlice) Sort ¶
func (es HistogramDataPointSlice) Sort(less func(a, b HistogramDataPoint) bool)
Sort sorts the HistogramDataPoint elements within HistogramDataPointSlice given the provided less function so that two instances of HistogramDataPointSlice can be compared.
type JSONMarshaler ¶
type JSONMarshaler struct{}
JSONMarshaler marshals pdata.Metrics to JSON bytes using the OTLP/JSON format.
func (*JSONMarshaler) MarshalMetrics ¶
func (*JSONMarshaler) MarshalMetrics(md Metrics) ([]byte, error)
MarshalMetrics to the OTLP/JSON format.
type JSONUnmarshaler ¶
type JSONUnmarshaler struct{}
JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to pdata.Metrics.
func (*JSONUnmarshaler) UnmarshalMetrics ¶
func (*JSONUnmarshaler) UnmarshalMetrics(buf []byte) (Metrics, error)
UnmarshalMetrics from OTLP/JSON format into pdata.Metrics.
type MarshalSizer ¶
MarshalSizer is the interface that groups the basic Marshal and Size methods
type Marshaler ¶
type Marshaler interface { // MarshalMetrics the given pmetric.Metrics into bytes. // If the error is not nil, the returned bytes slice cannot be used. MarshalMetrics(md Metrics) ([]byte, error) }
Marshaler marshals pmetric.Metrics into bytes.
type Metric ¶
type Metric struct {
// contains filtered or unexported fields
}
Metric represents one metric as a collection of datapoints. See Metric definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewMetric function to create new instances. Important: zero-initialized instance is not valid for use.
func NewMetric ¶
func NewMetric() Metric
NewMetric creates a new empty Metric.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Metric) CopyTo ¶
CopyTo copies all properties from the current struct overriding the destination.
func (Metric) Description ¶
Description returns the description associated with this Metric.
func (Metric) ExponentialHistogram ¶
func (ms Metric) ExponentialHistogram() ExponentialHistogram
ExponentialHistogram returns the exponentialhistogram associated with this Metric.
Calling this function when Type() != MetricTypeExponentialHistogram returns an invalid zero-initialized instance of ExponentialHistogram. Note that using such ExponentialHistogram instance can cause panic.
Calling this function on zero-initialized Metric will cause a panic.
func (Metric) Gauge ¶
Gauge returns the gauge associated with this Metric.
Calling this function when Type() != MetricTypeGauge returns an invalid zero-initialized instance of Gauge. Note that using such Gauge instance can cause panic.
Calling this function on zero-initialized Metric will cause a panic.
func (Metric) Histogram ¶
Histogram returns the histogram associated with this Metric.
Calling this function when Type() != MetricTypeHistogram returns an invalid zero-initialized instance of Histogram. Note that using such Histogram instance can cause panic.
Calling this function on zero-initialized Metric will cause a panic.
func (Metric) MoveTo ¶
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (Metric) SetDescription ¶
SetDescription replaces the description associated with this Metric.
func (Metric) SetEmptyExponentialHistogram ¶
func (ms Metric) SetEmptyExponentialHistogram() ExponentialHistogram
SetEmptyExponentialHistogram sets an empty exponentialhistogram to this Metric.
After this, Type() function will return MetricTypeExponentialHistogram".
Calling this function on zero-initialized Metric will cause a panic.
func (Metric) SetEmptyGauge ¶
SetEmptyGauge sets an empty gauge to this Metric.
After this, Type() function will return MetricTypeGauge".
Calling this function on zero-initialized Metric will cause a panic.
func (Metric) SetEmptyHistogram ¶
SetEmptyHistogram sets an empty histogram to this Metric.
After this, Type() function will return MetricTypeHistogram".
Calling this function on zero-initialized Metric will cause a panic.
func (Metric) SetEmptySum ¶
SetEmptySum sets an empty sum to this Metric.
After this, Type() function will return MetricTypeSum".
Calling this function on zero-initialized Metric will cause a panic.
func (Metric) SetEmptySummary ¶
SetEmptySummary sets an empty summary to this Metric.
After this, Type() function will return MetricTypeSummary".
Calling this function on zero-initialized Metric will cause a panic.
func (Metric) Sum ¶
Sum returns the sum associated with this Metric.
Calling this function when Type() != MetricTypeSum returns an invalid zero-initialized instance of Sum. Note that using such Sum instance can cause panic.
Calling this function on zero-initialized Metric will cause a panic.
func (Metric) Summary ¶
Summary returns the summary associated with this Metric.
Calling this function when Type() != MetricTypeSummary returns an invalid zero-initialized instance of Summary. Note that using such Summary instance can cause panic.
Calling this function on zero-initialized Metric will cause a panic.
func (Metric) Type ¶
func (ms Metric) Type() MetricType
Type returns the type of the data for this Metric. Calling this function on zero-initialized Metric will cause a panic.
type MetricSlice ¶
type MetricSlice struct {
// contains filtered or unexported fields
}
MetricSlice logically represents a slice of Metric.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewMetricSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewMetricSlice ¶
func NewMetricSlice() MetricSlice
NewMetricSlice creates a MetricSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (MetricSlice) AppendEmpty ¶
func (es MetricSlice) AppendEmpty() Metric
AppendEmpty will append to the end of the slice an empty Metric. It returns the newly added Metric.
func (MetricSlice) At ¶
func (es MetricSlice) At(i int) Metric
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (MetricSlice) CopyTo ¶
func (es MetricSlice) CopyTo(dest MetricSlice)
CopyTo copies all elements from the current slice overriding the destination.
func (MetricSlice) EnsureCapacity ¶
func (es MetricSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new MetricSlice can be initialized:
es := NewMetricSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (MetricSlice) Len ¶
func (es MetricSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewMetricSlice()".
func (MetricSlice) MoveAndAppendTo ¶
func (es MetricSlice) MoveAndAppendTo(dest MetricSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (MetricSlice) RemoveIf ¶
func (es MetricSlice) RemoveIf(f func(Metric) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (MetricSlice) Sort ¶
func (es MetricSlice) Sort(less func(a, b Metric) bool)
Sort sorts the Metric elements within MetricSlice given the provided less function so that two instances of MetricSlice can be compared.
type MetricType ¶
type MetricType int32
MetricType specifies the type of data in a Metric.
const ( // MetricTypeEmpty means that metric type is unset. MetricTypeEmpty MetricType = iota MetricTypeGauge MetricTypeSum MetricTypeHistogram MetricTypeExponentialHistogram MetricTypeSummary )
func (MetricType) String ¶
func (mdt MetricType) String() string
String returns the string representation of the MetricType.
type Metrics ¶
Metrics is the top-level struct that is propagated through the metrics pipeline. Use NewMetrics to create new instance, zero-initialized instance is not valid for use.
func (Metrics) DataPointCount ¶
DataPointCount calculates the total number of data points.
func (Metrics) IsReadOnly ¶
IsReadOnly returns true if this Metrics instance is read-only.
func (Metrics) MarkReadOnly ¶
func (ms Metrics) MarkReadOnly()
MarkReadOnly marks the Metrics as shared so that no further modifications can be done on it.
func (Metrics) MetricCount ¶
MetricCount calculates the total number of metrics.
func (Metrics) ResourceMetrics ¶
func (ms Metrics) ResourceMetrics() ResourceMetricsSlice
ResourceMetrics returns the ResourceMetricsSlice associated with this Metrics.
type NumberDataPoint ¶
type NumberDataPoint struct {
// contains filtered or unexported fields
}
NumberDataPoint is a single data point in a timeseries that describes the time-varying value of a number metric.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewNumberDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewNumberDataPoint ¶
func NewNumberDataPoint() NumberDataPoint
NewNumberDataPoint creates a new empty NumberDataPoint.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (NumberDataPoint) Attributes ¶
func (ms NumberDataPoint) Attributes() pcommon.Map
Attributes returns the Attributes associated with this NumberDataPoint.
func (NumberDataPoint) CopyTo ¶
func (ms NumberDataPoint) CopyTo(dest NumberDataPoint)
CopyTo copies all properties from the current struct overriding the destination.
func (NumberDataPoint) DoubleValue ¶
func (ms NumberDataPoint) DoubleValue() float64
DoubleValue returns the double associated with this NumberDataPoint.
func (NumberDataPoint) Exemplars ¶
func (ms NumberDataPoint) Exemplars() ExemplarSlice
Exemplars returns the Exemplars associated with this NumberDataPoint.
func (NumberDataPoint) Flags ¶
func (ms NumberDataPoint) Flags() DataPointFlags
Flags returns the flags associated with this NumberDataPoint.
func (NumberDataPoint) IntValue ¶
func (ms NumberDataPoint) IntValue() int64
IntValue returns the int associated with this NumberDataPoint.
func (NumberDataPoint) IsNil ¶
func (ms NumberDataPoint) IsNil() bool
IsNil returns whether the struct is nil value.
func (NumberDataPoint) MoveTo ¶
func (ms NumberDataPoint) MoveTo(dest NumberDataPoint)
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (NumberDataPoint) SetDoubleValue ¶
func (ms NumberDataPoint) SetDoubleValue(v float64)
SetDoubleValue replaces the double associated with this NumberDataPoint.
func (NumberDataPoint) SetFlags ¶
func (ms NumberDataPoint) SetFlags(v DataPointFlags)
SetFlags replaces the flags associated with this NumberDataPoint.
func (NumberDataPoint) SetIntValue ¶
func (ms NumberDataPoint) SetIntValue(v int64)
SetIntValue replaces the int associated with this NumberDataPoint.
func (NumberDataPoint) SetStartTimestamp ¶
func (ms NumberDataPoint) SetStartTimestamp(v pcommon.Timestamp)
SetStartTimestamp replaces the starttimestamp associated with this NumberDataPoint.
func (NumberDataPoint) SetTimestamp ¶
func (ms NumberDataPoint) SetTimestamp(v pcommon.Timestamp)
SetTimestamp replaces the timestamp associated with this NumberDataPoint.
func (NumberDataPoint) StartTimestamp ¶
func (ms NumberDataPoint) StartTimestamp() pcommon.Timestamp
StartTimestamp returns the starttimestamp associated with this NumberDataPoint.
func (NumberDataPoint) Timestamp ¶
func (ms NumberDataPoint) Timestamp() pcommon.Timestamp
Timestamp returns the timestamp associated with this NumberDataPoint.
func (NumberDataPoint) ValueType ¶
func (ms NumberDataPoint) ValueType() NumberDataPointValueType
ValueType returns the type of the value for this NumberDataPoint. Calling this function on zero-initialized NumberDataPoint will cause a panic.
type NumberDataPointSlice ¶
type NumberDataPointSlice struct {
// contains filtered or unexported fields
}
NumberDataPointSlice logically represents a slice of NumberDataPoint.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewNumberDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewNumberDataPointSlice ¶
func NewNumberDataPointSlice() NumberDataPointSlice
NewNumberDataPointSlice creates a NumberDataPointSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (NumberDataPointSlice) AppendEmpty ¶
func (es NumberDataPointSlice) AppendEmpty() NumberDataPoint
AppendEmpty will append to the end of the slice an empty NumberDataPoint. It returns the newly added NumberDataPoint.
func (NumberDataPointSlice) At ¶
func (es NumberDataPointSlice) At(i int) NumberDataPoint
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (NumberDataPointSlice) CopyTo ¶
func (es NumberDataPointSlice) CopyTo(dest NumberDataPointSlice)
CopyTo copies all elements from the current slice overriding the destination.
func (NumberDataPointSlice) EnsureCapacity ¶
func (es NumberDataPointSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new NumberDataPointSlice can be initialized:
es := NewNumberDataPointSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (NumberDataPointSlice) Len ¶
func (es NumberDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewNumberDataPointSlice()".
func (NumberDataPointSlice) MoveAndAppendTo ¶
func (es NumberDataPointSlice) MoveAndAppendTo(dest NumberDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (NumberDataPointSlice) RemoveIf ¶
func (es NumberDataPointSlice) RemoveIf(f func(NumberDataPoint) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (NumberDataPointSlice) Sort ¶
func (es NumberDataPointSlice) Sort(less func(a, b NumberDataPoint) bool)
Sort sorts the NumberDataPoint elements within NumberDataPointSlice given the provided less function so that two instances of NumberDataPointSlice can be compared.
type NumberDataPointValueType ¶
type NumberDataPointValueType int32
NumberDataPointValueType specifies the type of NumberDataPoint value.
const ( // NumberDataPointValueTypeEmpty means that data point value is unset. NumberDataPointValueTypeEmpty NumberDataPointValueType = iota NumberDataPointValueTypeInt NumberDataPointValueTypeDouble )
func (NumberDataPointValueType) String ¶
func (nt NumberDataPointValueType) String() string
String returns the string representation of the NumberDataPointValueType.
type ProtoMarshaler ¶
type ProtoMarshaler struct{}
func (*ProtoMarshaler) MarshalMetrics ¶
func (e *ProtoMarshaler) MarshalMetrics(md Metrics) ([]byte, error)
func (*ProtoMarshaler) MetricsSize ¶
func (e *ProtoMarshaler) MetricsSize(md Metrics) int
type ProtoUnmarshaler ¶
type ProtoUnmarshaler struct{}
func (*ProtoUnmarshaler) UnmarshalMetrics ¶
func (d *ProtoUnmarshaler) UnmarshalMetrics(buf []byte) (Metrics, error)
type ResourceMetrics ¶
type ResourceMetrics struct {
// contains filtered or unexported fields
}
ResourceMetrics is a collection of metrics from a Resource.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewResourceMetrics function to create new instances. Important: zero-initialized instance is not valid for use.
func NewResourceMetrics ¶
func NewResourceMetrics() ResourceMetrics
NewResourceMetrics creates a new empty ResourceMetrics.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (ResourceMetrics) CopyTo ¶
func (ms ResourceMetrics) CopyTo(dest ResourceMetrics)
CopyTo copies all properties from the current struct overriding the destination.
func (ResourceMetrics) IsNil ¶
func (ms ResourceMetrics) IsNil() bool
IsNil returns whether the struct is nil value.
func (ResourceMetrics) MoveTo ¶
func (ms ResourceMetrics) MoveTo(dest ResourceMetrics)
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (ResourceMetrics) Resource ¶
func (ms ResourceMetrics) Resource() pcommon.Resource
Resource returns the resource associated with this ResourceMetrics.
func (ResourceMetrics) SchemaUrl ¶
func (ms ResourceMetrics) SchemaUrl() string
SchemaUrl returns the schemaurl associated with this ResourceMetrics.
func (ResourceMetrics) ScopeMetrics ¶
func (ms ResourceMetrics) ScopeMetrics() ScopeMetricsSlice
ScopeMetrics returns the ScopeMetrics associated with this ResourceMetrics.
func (ResourceMetrics) SetSchemaUrl ¶
func (ms ResourceMetrics) SetSchemaUrl(v string)
SetSchemaUrl replaces the schemaurl associated with this ResourceMetrics.
type ResourceMetricsSlice ¶
type ResourceMetricsSlice struct {
// contains filtered or unexported fields
}
ResourceMetricsSlice logically represents a slice of ResourceMetrics.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewResourceMetricsSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewResourceMetricsSlice ¶
func NewResourceMetricsSlice() ResourceMetricsSlice
NewResourceMetricsSlice creates a ResourceMetricsSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (ResourceMetricsSlice) AppendEmpty ¶
func (es ResourceMetricsSlice) AppendEmpty() ResourceMetrics
AppendEmpty will append to the end of the slice an empty ResourceMetrics. It returns the newly added ResourceMetrics.
func (ResourceMetricsSlice) At ¶
func (es ResourceMetricsSlice) At(i int) ResourceMetrics
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (ResourceMetricsSlice) CopyTo ¶
func (es ResourceMetricsSlice) CopyTo(dest ResourceMetricsSlice)
CopyTo copies all elements from the current slice overriding the destination.
func (ResourceMetricsSlice) EnsureCapacity ¶
func (es ResourceMetricsSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new ResourceMetricsSlice can be initialized:
es := NewResourceMetricsSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (ResourceMetricsSlice) Len ¶
func (es ResourceMetricsSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewResourceMetricsSlice()".
func (ResourceMetricsSlice) MoveAndAppendTo ¶
func (es ResourceMetricsSlice) MoveAndAppendTo(dest ResourceMetricsSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (ResourceMetricsSlice) RemoveIf ¶
func (es ResourceMetricsSlice) RemoveIf(f func(ResourceMetrics) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (ResourceMetricsSlice) Sort ¶
func (es ResourceMetricsSlice) Sort(less func(a, b ResourceMetrics) bool)
Sort sorts the ResourceMetrics elements within ResourceMetricsSlice given the provided less function so that two instances of ResourceMetricsSlice can be compared.
type ScopeMetrics ¶
type ScopeMetrics struct {
// contains filtered or unexported fields
}
ScopeMetrics is a collection of metrics from a LibraryInstrumentation.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewScopeMetrics function to create new instances. Important: zero-initialized instance is not valid for use.
func NewScopeMetrics ¶
func NewScopeMetrics() ScopeMetrics
NewScopeMetrics creates a new empty ScopeMetrics.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (ScopeMetrics) CopyTo ¶
func (ms ScopeMetrics) CopyTo(dest ScopeMetrics)
CopyTo copies all properties from the current struct overriding the destination.
func (ScopeMetrics) IsNil ¶
func (ms ScopeMetrics) IsNil() bool
IsNil returns whether the struct is nil value.
func (ScopeMetrics) Metrics ¶
func (ms ScopeMetrics) Metrics() MetricSlice
Metrics returns the Metrics associated with this ScopeMetrics.
func (ScopeMetrics) MoveTo ¶
func (ms ScopeMetrics) MoveTo(dest ScopeMetrics)
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (ScopeMetrics) SchemaUrl ¶
func (ms ScopeMetrics) SchemaUrl() string
SchemaUrl returns the schemaurl associated with this ScopeMetrics.
func (ScopeMetrics) Scope ¶
func (ms ScopeMetrics) Scope() pcommon.InstrumentationScope
Scope returns the scope associated with this ScopeMetrics.
func (ScopeMetrics) SetSchemaUrl ¶
func (ms ScopeMetrics) SetSchemaUrl(v string)
SetSchemaUrl replaces the schemaurl associated with this ScopeMetrics.
type ScopeMetricsSlice ¶
type ScopeMetricsSlice struct {
// contains filtered or unexported fields
}
ScopeMetricsSlice logically represents a slice of ScopeMetrics.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewScopeMetricsSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewScopeMetricsSlice ¶
func NewScopeMetricsSlice() ScopeMetricsSlice
NewScopeMetricsSlice creates a ScopeMetricsSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (ScopeMetricsSlice) AppendEmpty ¶
func (es ScopeMetricsSlice) AppendEmpty() ScopeMetrics
AppendEmpty will append to the end of the slice an empty ScopeMetrics. It returns the newly added ScopeMetrics.
func (ScopeMetricsSlice) At ¶
func (es ScopeMetricsSlice) At(i int) ScopeMetrics
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (ScopeMetricsSlice) CopyTo ¶
func (es ScopeMetricsSlice) CopyTo(dest ScopeMetricsSlice)
CopyTo copies all elements from the current slice overriding the destination.
func (ScopeMetricsSlice) EnsureCapacity ¶
func (es ScopeMetricsSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new ScopeMetricsSlice can be initialized:
es := NewScopeMetricsSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (ScopeMetricsSlice) Len ¶
func (es ScopeMetricsSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewScopeMetricsSlice()".
func (ScopeMetricsSlice) MoveAndAppendTo ¶
func (es ScopeMetricsSlice) MoveAndAppendTo(dest ScopeMetricsSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (ScopeMetricsSlice) RemoveIf ¶
func (es ScopeMetricsSlice) RemoveIf(f func(ScopeMetrics) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (ScopeMetricsSlice) Sort ¶
func (es ScopeMetricsSlice) Sort(less func(a, b ScopeMetrics) bool)
Sort sorts the ScopeMetrics elements within ScopeMetricsSlice given the provided less function so that two instances of ScopeMetricsSlice can be compared.
type Sizer ¶
type Sizer interface { // MetricsSize returns the size in bytes of a marshaled Metrics. MetricsSize(md Metrics) int }
Sizer is an optional interface implemented by the Marshaler, that calculates the size of a marshaled Metrics.
type Sum ¶
type Sum struct {
// contains filtered or unexported fields
}
Sum represents the type of a numeric metric that is calculated as a sum of all reported measurements over a time interval.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSum function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSum ¶
func NewSum() Sum
NewSum creates a new empty Sum.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Sum) AggregationTemporality ¶
func (ms Sum) AggregationTemporality() AggregationTemporality
AggregationTemporality returns the aggregationtemporality associated with this Sum.
func (Sum) CopyTo ¶
CopyTo copies all properties from the current struct overriding the destination.
func (Sum) DataPoints ¶
func (ms Sum) DataPoints() NumberDataPointSlice
DataPoints returns the DataPoints associated with this Sum.
func (Sum) IsMonotonic ¶
IsMonotonic returns the ismonotonic associated with this Sum.
func (Sum) MoveTo ¶
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (Sum) SetAggregationTemporality ¶
func (ms Sum) SetAggregationTemporality(v AggregationTemporality)
SetAggregationTemporality replaces the aggregationtemporality associated with this Sum.
func (Sum) SetIsMonotonic ¶
SetIsMonotonic replaces the ismonotonic associated with this Sum.
type Summary ¶
type Summary struct {
// contains filtered or unexported fields
}
Summary represents the type of a metric that is calculated by aggregating as a Summary of all reported double measurements over a time interval.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSummary function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSummary ¶
func NewSummary() Summary
NewSummary creates a new empty Summary.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Summary) CopyTo ¶
CopyTo copies all properties from the current struct overriding the destination.
func (Summary) DataPoints ¶
func (ms Summary) DataPoints() SummaryDataPointSlice
DataPoints returns the DataPoints associated with this Summary.
type SummaryDataPoint ¶
type SummaryDataPoint struct {
// contains filtered or unexported fields
}
SummaryDataPoint is a single data point in a timeseries that describes the time-varying values of a Summary of double values.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSummaryDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSummaryDataPoint ¶
func NewSummaryDataPoint() SummaryDataPoint
NewSummaryDataPoint creates a new empty SummaryDataPoint.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (SummaryDataPoint) Attributes ¶
func (ms SummaryDataPoint) Attributes() pcommon.Map
Attributes returns the Attributes associated with this SummaryDataPoint.
func (SummaryDataPoint) CopyTo ¶
func (ms SummaryDataPoint) CopyTo(dest SummaryDataPoint)
CopyTo copies all properties from the current struct overriding the destination.
func (SummaryDataPoint) Count ¶
func (ms SummaryDataPoint) Count() uint64
Count returns the count associated with this SummaryDataPoint.
func (SummaryDataPoint) Flags ¶
func (ms SummaryDataPoint) Flags() DataPointFlags
Flags returns the flags associated with this SummaryDataPoint.
func (SummaryDataPoint) IsNil ¶
func (ms SummaryDataPoint) IsNil() bool
IsNil returns whether the struct is nil value.
func (SummaryDataPoint) MoveTo ¶
func (ms SummaryDataPoint) MoveTo(dest SummaryDataPoint)
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (SummaryDataPoint) QuantileValues ¶
func (ms SummaryDataPoint) QuantileValues() SummaryDataPointValueAtQuantileSlice
QuantileValues returns the QuantileValues associated with this SummaryDataPoint.
func (SummaryDataPoint) SetCount ¶
func (ms SummaryDataPoint) SetCount(v uint64)
SetCount replaces the count associated with this SummaryDataPoint.
func (SummaryDataPoint) SetFlags ¶
func (ms SummaryDataPoint) SetFlags(v DataPointFlags)
SetFlags replaces the flags associated with this SummaryDataPoint.
func (SummaryDataPoint) SetStartTimestamp ¶
func (ms SummaryDataPoint) SetStartTimestamp(v pcommon.Timestamp)
SetStartTimestamp replaces the starttimestamp associated with this SummaryDataPoint.
func (SummaryDataPoint) SetSum ¶
func (ms SummaryDataPoint) SetSum(v float64)
SetSum replaces the sum associated with this SummaryDataPoint.
func (SummaryDataPoint) SetTimestamp ¶
func (ms SummaryDataPoint) SetTimestamp(v pcommon.Timestamp)
SetTimestamp replaces the timestamp associated with this SummaryDataPoint.
func (SummaryDataPoint) StartTimestamp ¶
func (ms SummaryDataPoint) StartTimestamp() pcommon.Timestamp
StartTimestamp returns the starttimestamp associated with this SummaryDataPoint.
func (SummaryDataPoint) Sum ¶
func (ms SummaryDataPoint) Sum() float64
Sum returns the sum associated with this SummaryDataPoint.
func (SummaryDataPoint) Timestamp ¶
func (ms SummaryDataPoint) Timestamp() pcommon.Timestamp
Timestamp returns the timestamp associated with this SummaryDataPoint.
type SummaryDataPointSlice ¶
type SummaryDataPointSlice struct {
// contains filtered or unexported fields
}
SummaryDataPointSlice logically represents a slice of SummaryDataPoint.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewSummaryDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSummaryDataPointSlice ¶
func NewSummaryDataPointSlice() SummaryDataPointSlice
NewSummaryDataPointSlice creates a SummaryDataPointSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (SummaryDataPointSlice) AppendEmpty ¶
func (es SummaryDataPointSlice) AppendEmpty() SummaryDataPoint
AppendEmpty will append to the end of the slice an empty SummaryDataPoint. It returns the newly added SummaryDataPoint.
func (SummaryDataPointSlice) At ¶
func (es SummaryDataPointSlice) At(i int) SummaryDataPoint
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (SummaryDataPointSlice) CopyTo ¶
func (es SummaryDataPointSlice) CopyTo(dest SummaryDataPointSlice)
CopyTo copies all elements from the current slice overriding the destination.
func (SummaryDataPointSlice) EnsureCapacity ¶
func (es SummaryDataPointSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new SummaryDataPointSlice can be initialized:
es := NewSummaryDataPointSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (SummaryDataPointSlice) Len ¶
func (es SummaryDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewSummaryDataPointSlice()".
func (SummaryDataPointSlice) MoveAndAppendTo ¶
func (es SummaryDataPointSlice) MoveAndAppendTo(dest SummaryDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (SummaryDataPointSlice) RemoveIf ¶
func (es SummaryDataPointSlice) RemoveIf(f func(SummaryDataPoint) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (SummaryDataPointSlice) Sort ¶
func (es SummaryDataPointSlice) Sort(less func(a, b SummaryDataPoint) bool)
Sort sorts the SummaryDataPoint elements within SummaryDataPointSlice given the provided less function so that two instances of SummaryDataPointSlice can be compared.
type SummaryDataPointValueAtQuantile ¶
type SummaryDataPointValueAtQuantile struct {
// contains filtered or unexported fields
}
SummaryDataPointValueAtQuantile is a quantile value within a Summary data point.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSummaryDataPointValueAtQuantile function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSummaryDataPointValueAtQuantile ¶
func NewSummaryDataPointValueAtQuantile() SummaryDataPointValueAtQuantile
NewSummaryDataPointValueAtQuantile creates a new empty SummaryDataPointValueAtQuantile.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (SummaryDataPointValueAtQuantile) CopyTo ¶
func (ms SummaryDataPointValueAtQuantile) CopyTo(dest SummaryDataPointValueAtQuantile)
CopyTo copies all properties from the current struct overriding the destination.
func (SummaryDataPointValueAtQuantile) IsNil ¶
func (ms SummaryDataPointValueAtQuantile) IsNil() bool
IsNil returns whether the struct is nil value.
func (SummaryDataPointValueAtQuantile) MoveTo ¶
func (ms SummaryDataPointValueAtQuantile) MoveTo(dest SummaryDataPointValueAtQuantile)
MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value
func (SummaryDataPointValueAtQuantile) Quantile ¶
func (ms SummaryDataPointValueAtQuantile) Quantile() float64
Quantile returns the quantile associated with this SummaryDataPointValueAtQuantile.
func (SummaryDataPointValueAtQuantile) SetQuantile ¶
func (ms SummaryDataPointValueAtQuantile) SetQuantile(v float64)
SetQuantile replaces the quantile associated with this SummaryDataPointValueAtQuantile.
func (SummaryDataPointValueAtQuantile) SetValue ¶
func (ms SummaryDataPointValueAtQuantile) SetValue(v float64)
SetValue replaces the value associated with this SummaryDataPointValueAtQuantile.
func (SummaryDataPointValueAtQuantile) Value ¶
func (ms SummaryDataPointValueAtQuantile) Value() float64
Value returns the value associated with this SummaryDataPointValueAtQuantile.
type SummaryDataPointValueAtQuantileSlice ¶
type SummaryDataPointValueAtQuantileSlice struct {
// contains filtered or unexported fields
}
SummaryDataPointValueAtQuantileSlice logically represents a slice of SummaryDataPointValueAtQuantile.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewSummaryDataPointValueAtQuantileSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSummaryDataPointValueAtQuantileSlice ¶
func NewSummaryDataPointValueAtQuantileSlice() SummaryDataPointValueAtQuantileSlice
NewSummaryDataPointValueAtQuantileSlice creates a SummaryDataPointValueAtQuantileSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (SummaryDataPointValueAtQuantileSlice) AppendEmpty ¶
func (es SummaryDataPointValueAtQuantileSlice) AppendEmpty() SummaryDataPointValueAtQuantile
AppendEmpty will append to the end of the slice an empty SummaryDataPointValueAtQuantile. It returns the newly added SummaryDataPointValueAtQuantile.
func (SummaryDataPointValueAtQuantileSlice) At ¶
func (es SummaryDataPointValueAtQuantileSlice) At(i int) SummaryDataPointValueAtQuantile
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (SummaryDataPointValueAtQuantileSlice) CopyTo ¶
func (es SummaryDataPointValueAtQuantileSlice) CopyTo(dest SummaryDataPointValueAtQuantileSlice)
CopyTo copies all elements from the current slice overriding the destination.
func (SummaryDataPointValueAtQuantileSlice) EnsureCapacity ¶
func (es SummaryDataPointValueAtQuantileSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new SummaryDataPointValueAtQuantileSlice can be initialized:
es := NewSummaryDataPointValueAtQuantileSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (SummaryDataPointValueAtQuantileSlice) Len ¶
func (es SummaryDataPointValueAtQuantileSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewSummaryDataPointValueAtQuantileSlice()".
func (SummaryDataPointValueAtQuantileSlice) MoveAndAppendTo ¶
func (es SummaryDataPointValueAtQuantileSlice) MoveAndAppendTo(dest SummaryDataPointValueAtQuantileSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (SummaryDataPointValueAtQuantileSlice) RemoveIf ¶
func (es SummaryDataPointValueAtQuantileSlice) RemoveIf(f func(SummaryDataPointValueAtQuantile) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (SummaryDataPointValueAtQuantileSlice) Sort ¶
func (es SummaryDataPointValueAtQuantileSlice) Sort(less func(a, b SummaryDataPointValueAtQuantile) bool)
Sort sorts the SummaryDataPointValueAtQuantile elements within SummaryDataPointValueAtQuantileSlice given the provided less function so that two instances of SummaryDataPointValueAtQuantileSlice can be compared.
type Unmarshaler ¶
type Unmarshaler interface { // UnmarshalMetrics the given bytes into pmetric.Metrics. // If the error is not nil, the returned pmetric.Metrics cannot be used. UnmarshalMetrics(buf []byte) (Metrics, error) }
Unmarshaler unmarshalls bytes into pmetric.Metrics.
Source Files ¶
- aggregation_temporality.go
- encoding.go
- exemplar_value_type.go
- generated_exemplar.go
- generated_exemplarslice.go
- generated_exponentialhistogram.go
- generated_exponentialhistogramdatapoint.go
- generated_exponentialhistogramdatapointbuckets.go
- generated_exponentialhistogramdatapointslice.go
- generated_gauge.go
- generated_histogram.go
- generated_histogramdatapoint.go
- generated_histogramdatapointslice.go
- generated_metric.go
- generated_metricslice.go
- generated_numberdatapoint.go
- generated_numberdatapointslice.go
- generated_resourcemetrics.go
- generated_resourcemetricsslice.go
- generated_scopemetrics.go
- generated_scopemetricsslice.go
- generated_sum.go
- generated_summary.go
- generated_summarydatapoint.go
- generated_summarydatapointslice.go
- generated_summarydatapointvalueatquantile.go
- generated_summarydatapointvalueatquantileslice.go
- json.go
- metric_data_point_flags.go
- metric_type.go
- metrics.go
- number_data_point_value_type.go
- pb.go