Documentation ¶
Index ¶
- Variables
- type AggregationTemporality
- type Exemplar
- func (*Exemplar) Descriptor() ([]byte, []int)
- func (m *Exemplar) GetDoubleValue() float64
- func (m *Exemplar) GetDroppedLabels() []v11.StringKeyValue
- func (m *Exemplar) GetInt64Value() int64
- func (m *Exemplar) GetSpanId() []byte
- func (m *Exemplar) GetTimeUnixNano() uint64
- func (m *Exemplar) GetTraceId() []byte
- func (m *Exemplar) Marshal() (dAtA []byte, err error)
- func (m *Exemplar) MarshalTo(dAtA []byte) (int, error)
- func (m *Exemplar) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Exemplar) ProtoMessage()
- func (m *Exemplar) Reset()
- func (m *Exemplar) Size() (n int)
- func (m *Exemplar) String() string
- func (m *Exemplar) Unmarshal(dAtA []byte) error
- func (m *Exemplar) XXX_DiscardUnknown()
- func (m *Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Exemplar) XXX_Merge(src proto.Message)
- func (m *Exemplar) XXX_Size() int
- func (m *Exemplar) XXX_Unmarshal(b []byte) error
- type Gauge
- func (*Gauge) Descriptor() ([]byte, []int)
- func (m *Gauge) GetDataPoints() []ScalarDataPoint
- func (m *Gauge) GetMeasurementValueType() MeasurementValueType
- func (m *Gauge) Marshal() (dAtA []byte, err error)
- func (m *Gauge) MarshalTo(dAtA []byte) (int, error)
- func (m *Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Gauge) ProtoMessage()
- func (m *Gauge) Reset()
- func (m *Gauge) Size() (n int)
- func (m *Gauge) String() string
- func (m *Gauge) Unmarshal(dAtA []byte) error
- func (m *Gauge) XXX_DiscardUnknown()
- func (m *Gauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Gauge) XXX_Merge(src proto.Message)
- func (m *Gauge) XXX_Size() int
- func (m *Gauge) XXX_Unmarshal(b []byte) error
- type Histogram
- func (*Histogram) Descriptor() ([]byte, []int)
- func (m *Histogram) GetAggregationTemporality() AggregationTemporality
- func (m *Histogram) GetDataPoints() []HistogramDataPoint
- func (m *Histogram) GetMeasurementValueType() MeasurementValueType
- func (m *Histogram) Marshal() (dAtA []byte, err error)
- func (m *Histogram) MarshalTo(dAtA []byte) (int, error)
- func (m *Histogram) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Histogram) ProtoMessage()
- func (m *Histogram) Reset()
- func (m *Histogram) Size() (n int)
- func (m *Histogram) String() string
- func (m *Histogram) Unmarshal(dAtA []byte) error
- func (m *Histogram) XXX_DiscardUnknown()
- func (m *Histogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Histogram) XXX_Merge(src proto.Message)
- func (m *Histogram) XXX_Size() int
- func (m *Histogram) XXX_Unmarshal(b []byte) error
- type HistogramDataPoint
- func (*HistogramDataPoint) Descriptor() ([]byte, []int)
- func (m *HistogramDataPoint) GetBucketCounts() []uint64
- func (m *HistogramDataPoint) GetCount() uint64
- func (m *HistogramDataPoint) GetDoubleSum() float64
- func (m *HistogramDataPoint) GetExemplars() []Exemplar
- func (m *HistogramDataPoint) GetExplicitBounds() []float64
- func (m *HistogramDataPoint) GetIntSum() int64
- func (m *HistogramDataPoint) GetLabels() []v11.StringKeyValue
- func (m *HistogramDataPoint) GetStartTimeUnixNano() uint64
- func (m *HistogramDataPoint) GetTimeUnixNano() uint64
- func (m *HistogramDataPoint) Marshal() (dAtA []byte, err error)
- func (m *HistogramDataPoint) MarshalTo(dAtA []byte) (int, error)
- func (m *HistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HistogramDataPoint) ProtoMessage()
- func (m *HistogramDataPoint) Reset()
- func (m *HistogramDataPoint) Size() (n int)
- func (m *HistogramDataPoint) String() string
- func (m *HistogramDataPoint) Unmarshal(dAtA []byte) error
- func (m *HistogramDataPoint) XXX_DiscardUnknown()
- func (m *HistogramDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HistogramDataPoint) XXX_Merge(src proto.Message)
- func (m *HistogramDataPoint) XXX_Size() int
- func (m *HistogramDataPoint) XXX_Unmarshal(b []byte) error
- type InstrumentationLibraryMetrics
- func (*InstrumentationLibraryMetrics) Descriptor() ([]byte, []int)
- func (m *InstrumentationLibraryMetrics) GetInstrumentationLibrary() *v11.InstrumentationLibrary
- func (m *InstrumentationLibraryMetrics) GetMetrics() []Metric
- func (m *InstrumentationLibraryMetrics) Marshal() (dAtA []byte, err error)
- func (m *InstrumentationLibraryMetrics) MarshalTo(dAtA []byte) (int, error)
- func (m *InstrumentationLibraryMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*InstrumentationLibraryMetrics) ProtoMessage()
- func (m *InstrumentationLibraryMetrics) Reset()
- func (m *InstrumentationLibraryMetrics) Size() (n int)
- func (m *InstrumentationLibraryMetrics) String() string
- func (m *InstrumentationLibraryMetrics) Unmarshal(dAtA []byte) error
- func (m *InstrumentationLibraryMetrics) XXX_DiscardUnknown()
- func (m *InstrumentationLibraryMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InstrumentationLibraryMetrics) XXX_Merge(src proto.Message)
- func (m *InstrumentationLibraryMetrics) XXX_Size() int
- func (m *InstrumentationLibraryMetrics) XXX_Unmarshal(b []byte) error
- type MeasurementValueType
- type Metric
- func (*Metric) Descriptor() ([]byte, []int)
- func (m *Metric) GetData() isMetric_Data
- func (m *Metric) GetDescription() string
- func (m *Metric) GetGauge() *Gauge
- func (m *Metric) GetHistogram() *Histogram
- func (m *Metric) GetName() string
- func (m *Metric) GetSum() *Sum
- func (m *Metric) GetUnit() string
- func (m *Metric) Marshal() (dAtA []byte, err error)
- func (m *Metric) MarshalTo(dAtA []byte) (int, error)
- func (m *Metric) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Metric) ProtoMessage()
- func (m *Metric) Reset()
- func (m *Metric) Size() (n int)
- func (m *Metric) String() string
- func (m *Metric) Unmarshal(dAtA []byte) error
- func (m *Metric) XXX_DiscardUnknown()
- func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Metric) XXX_Merge(src proto.Message)
- func (*Metric) XXX_OneofWrappers() []interface{}
- func (m *Metric) XXX_Size() int
- func (m *Metric) XXX_Unmarshal(b []byte) error
- type Metric_Gauge
- type Metric_Histogram
- type Metric_Sum
- type ResourceMetrics
- func (*ResourceMetrics) Descriptor() ([]byte, []int)
- func (m *ResourceMetrics) GetInstrumentationLibraryMetrics() []InstrumentationLibraryMetrics
- func (m *ResourceMetrics) GetResource() *v1.Resource
- func (m *ResourceMetrics) Marshal() (dAtA []byte, err error)
- func (m *ResourceMetrics) MarshalTo(dAtA []byte) (int, error)
- func (m *ResourceMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ResourceMetrics) ProtoMessage()
- func (m *ResourceMetrics) Reset()
- func (m *ResourceMetrics) Size() (n int)
- func (m *ResourceMetrics) String() string
- func (m *ResourceMetrics) Unmarshal(dAtA []byte) error
- func (m *ResourceMetrics) XXX_DiscardUnknown()
- func (m *ResourceMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ResourceMetrics) XXX_Merge(src proto.Message)
- func (m *ResourceMetrics) XXX_Size() int
- func (m *ResourceMetrics) XXX_Unmarshal(b []byte) error
- type ScalarDataPoint
- func (*ScalarDataPoint) Descriptor() ([]byte, []int)
- func (m *ScalarDataPoint) GetDoubleValue() float64
- func (m *ScalarDataPoint) GetExemplars() []Exemplar
- func (m *ScalarDataPoint) GetInt64Value() int64
- func (m *ScalarDataPoint) GetLabels() []v11.StringKeyValue
- func (m *ScalarDataPoint) GetStartTimeUnixNano() uint64
- func (m *ScalarDataPoint) GetTimeUnixNano() uint64
- func (m *ScalarDataPoint) Marshal() (dAtA []byte, err error)
- func (m *ScalarDataPoint) MarshalTo(dAtA []byte) (int, error)
- func (m *ScalarDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ScalarDataPoint) ProtoMessage()
- func (m *ScalarDataPoint) Reset()
- func (m *ScalarDataPoint) Size() (n int)
- func (m *ScalarDataPoint) String() string
- func (m *ScalarDataPoint) Unmarshal(dAtA []byte) error
- func (m *ScalarDataPoint) XXX_DiscardUnknown()
- func (m *ScalarDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ScalarDataPoint) XXX_Merge(src proto.Message)
- func (m *ScalarDataPoint) XXX_Size() int
- func (m *ScalarDataPoint) XXX_Unmarshal(b []byte) error
- type Sum
- func (*Sum) Descriptor() ([]byte, []int)
- func (m *Sum) GetAggregationTemporality() AggregationTemporality
- func (m *Sum) GetDataPoints() []ScalarDataPoint
- func (m *Sum) GetIsMonotonic() bool
- func (m *Sum) GetMeasurementValueType() MeasurementValueType
- func (m *Sum) Marshal() (dAtA []byte, err error)
- func (m *Sum) MarshalTo(dAtA []byte) (int, error)
- func (m *Sum) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Sum) ProtoMessage()
- func (m *Sum) Reset()
- func (m *Sum) Size() (n int)
- func (m *Sum) String() string
- func (m *Sum) Unmarshal(dAtA []byte) error
- func (m *Sum) XXX_DiscardUnknown()
- func (m *Sum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Sum) XXX_Merge(src proto.Message)
- func (m *Sum) XXX_Size() int
- func (m *Sum) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMetrics = fmt.Errorf("proto: unexpected end of group") )
var AggregationTemporality_name = map[int32]string{
0: "AGGREGATION_TEMPORALITY_UNSPECIFIED",
1: "AGGREGATION_TEMPORALITY_DELTA",
2: "AGGREGATION_TEMPORALITY_CUMULATIVE",
}
var AggregationTemporality_value = map[string]int32{
"AGGREGATION_TEMPORALITY_UNSPECIFIED": 0,
"AGGREGATION_TEMPORALITY_DELTA": 1,
"AGGREGATION_TEMPORALITY_CUMULATIVE": 2,
}
var MeasurementValueType_name = map[int32]string{
0: "MEASUREMENT_VALUE_TYPE_UNSPECIFIED",
1: "MEASUREMENT_VALUE_TYPE_INT64",
2: "MEASUREMENT_VALUE_TYPE_DOUBLE",
}
var MeasurementValueType_value = map[string]int32{
"MEASUREMENT_VALUE_TYPE_UNSPECIFIED": 0,
"MEASUREMENT_VALUE_TYPE_INT64": 1,
"MEASUREMENT_VALUE_TYPE_DOUBLE": 2,
}
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.
const ( // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED AggregationTemporality = 0 // DELTA is an AggregationTemporality for a metric aggregator which reports // changes since last report time. Successive metrics contain aggregation of // values from continuous and non-overlapping intervals. // // The values for a DELTA metric are based only on the time interval // associated with one measurement cycle. There is no dependency on // previous measurements like is the case for CUMULATIVE metrics. // // For example, consider a system measuring the number of requests that // it receives and reports the sum of these requests every second as a // DELTA metric: // // 1. The system starts receiving at time=t_0. // 2. A request is received, the system measures 1 request. // 3. A request is received, the system measures 1 request. // 4. A request is received, the system measures 1 request. // 5. The 1 second collection cycle ends. A metric is exported for the // number of requests received over the interval of time t_0 to // t_0+1 with a value of 3. // 6. A request is received, the system measures 1 request. // 7. A request is received, the system measures 1 request. // 8. The 1 second collection cycle ends. A metric is exported for the // number of requests received over the interval of time t_0+1 to // t_0+2 with a value of 2. AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA AggregationTemporality = 1 // CUMULATIVE is an AggregationTemporality for a metic aggregator which // reports changes since a fixed start time. This means that current values // of a CUMULATIVE metric depend on all previous measurements since the // start time. Because of this, the sender is required to retain this state // in some form. If this state is lost or invalidated, the CUMULATIVE metric // values MUST be reset and a new fixed start time following the last // reported measurement time sent MUST be used. // // For example, consider a system measuring the number of requests that // it receives and reports the sum of these requests every second as a // CUMULATIVE metric: // // 1. The system starts receiving at time=t_0. // 2. A request is received, the system measures 1 request. // 3. A request is received, the system measures 1 request. // 4. A request is received, the system measures 1 request. // 5. The 1 second collection cycle ends. A metric is exported for the // number of requests received over the interval of time t_0 to // t_0+1 with a value of 3. // 6. A request is received, the system measures 1 request. // 7. A request is received, the system measures 1 request. // 8. The 1 second collection cycle ends. A metric is exported for the // number of requests received over the interval of time t_0 to // t_0+2 with a value of 5. // 9. The system experiences a fault and loses state. // 10. The system recovers and resumes receiving at time=t_1. // 11. A request is received, the system measures 1 request. // 12. The 1 second collection cycle ends. A metric is exported for the // number of requests received over the interval of time t_1 to // t_0+1 with a value of 1. // // Note: Even though, when reporting changes since last report time, using // CUMULATIVE is valid, it is not recommended. This may cause problems for // systems that do not use start_time to determine when the aggregation // value was reset (e.g. Prometheus). AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE AggregationTemporality = 2 )
func (AggregationTemporality) EnumDescriptor ¶
func (AggregationTemporality) EnumDescriptor() ([]byte, []int)
func (AggregationTemporality) String ¶
func (x AggregationTemporality) String() string
type Exemplar ¶
type Exemplar struct { // The set of labels that were dropped by the aggregator, but recorded // alongside the original measurement. Only labels that were dropped by the // aggregator should be included DroppedLabels []v11.StringKeyValue `protobuf:"bytes,1,rep,name=dropped_labels,json=droppedLabels,proto3" json:"dropped_labels"` // time_unix_nano is the exact time when this exemplar was recorded // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. TimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` // Numerical value of the measurement that was recorded. Only one of these // two fields is used for the data, based on MeasurementValueType. DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"` Int64Value int64 `protobuf:"varint,4,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"` // (Optional) Span ID of the exemplar trace. // span_id may be missing if the measurement is not recorded inside a trace // or if the trace is not sampled. SpanId []byte `protobuf:"bytes,5,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` // (Optional) Trace ID of the exemplar trace. // trace_id may be missing if the measurement is not recorded inside a trace // or if the trace is not sampled. TraceId []byte `protobuf:"bytes,6,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` }
A representation of an exemplar, which is a sample input 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.
func (*Exemplar) Descriptor ¶
func (*Exemplar) GetDoubleValue ¶
func (*Exemplar) GetDroppedLabels ¶
func (m *Exemplar) GetDroppedLabels() []v11.StringKeyValue
func (*Exemplar) GetInt64Value ¶
func (*Exemplar) GetTimeUnixNano ¶
func (*Exemplar) GetTraceId ¶
func (*Exemplar) MarshalToSizedBuffer ¶
func (*Exemplar) ProtoMessage ¶
func (*Exemplar) ProtoMessage()
func (*Exemplar) XXX_DiscardUnknown ¶
func (m *Exemplar) XXX_DiscardUnknown()
func (*Exemplar) XXX_Marshal ¶
func (*Exemplar) XXX_Unmarshal ¶
type Gauge ¶
type Gauge struct { DataPoints []ScalarDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points"` // It describes the value type of the measurement used to build this // aggregation. // // Determines if the points are Int64DataPoint or DoubleDataPoint, as well // as the value type of the exemplars. MeasurementValueType MeasurementValueType `` /* 174-byte string literal not displayed */ }
Gauge represents the type of a scalar metric that always exports the "current value" for every data point. It should be used for an "unknown" aggregation.
A Gauge does not support different aggregation temporalities. Given the aggregation is unknown, points cannot be combined using the same aggregation, regardless of aggregation temporalities. Therefore, AggregationTemporality is not included. Consequently, this also means "StartTimeUnixNano" is ignored for all data points.
func (*Gauge) Descriptor ¶
func (*Gauge) GetDataPoints ¶
func (m *Gauge) GetDataPoints() []ScalarDataPoint
func (*Gauge) GetMeasurementValueType ¶
func (m *Gauge) GetMeasurementValueType() MeasurementValueType
func (*Gauge) ProtoMessage ¶
func (*Gauge) ProtoMessage()
func (*Gauge) XXX_DiscardUnknown ¶
func (m *Gauge) XXX_DiscardUnknown()
func (*Gauge) XXX_Marshal ¶
func (*Gauge) XXX_Unmarshal ¶
type Histogram ¶
type Histogram struct { DataPoints []HistogramDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points"` // It describes the value type of the measurement used to build this // aggregation. // // Determines the value type of the exemplars. MeasurementValueType MeasurementValueType `` /* 174-byte string literal not displayed */ // aggregation_temporality describes if the aggregator reports delta changes // since last report time, or cumulative changes since a fixed start time. AggregationTemporality AggregationTemporality `` /* 180-byte string literal not displayed */ }
Represents the type of a metric that is calculated by aggregating as a Histogram of all reported measurements over a time interval.
func (*Histogram) Descriptor ¶
func (*Histogram) GetAggregationTemporality ¶
func (m *Histogram) GetAggregationTemporality() AggregationTemporality
func (*Histogram) GetDataPoints ¶
func (m *Histogram) GetDataPoints() []HistogramDataPoint
func (*Histogram) GetMeasurementValueType ¶
func (m *Histogram) GetMeasurementValueType() MeasurementValueType
func (*Histogram) MarshalToSizedBuffer ¶
func (*Histogram) ProtoMessage ¶
func (*Histogram) ProtoMessage()
func (*Histogram) XXX_DiscardUnknown ¶
func (m *Histogram) XXX_DiscardUnknown()
func (*Histogram) XXX_Marshal ¶
func (*Histogram) XXX_Unmarshal ¶
type HistogramDataPoint ¶
type HistogramDataPoint struct { // The set of labels that uniquely identify this timeseries. Labels []v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels"` // start_time_unix_nano is the last time when the aggregation value was reset // to "zero". For some metric types this is ignored, see data types for more // details. // // The aggregation value is over the time interval (start_time_unix_nano, // time_unix_nano]. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970. // // Value of 0 indicates that the timestamp is unspecified. In that case the // timestamp may be decided by the backend. StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` // time_unix_nano is the moment when this aggregation value was reported. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970. TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` // count is the number of values in the population. Must be non-negative. This value // must be equal to the sum of the "count" fields in buckets if a histogram is provided. Count uint64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` // sum of the values in the population. If count is zero then this field // must be zero. This value must be equal to the sum of the "sum" fields in // buckets if a histogram is provided. Only one of these two fields is used // for the data, based on MeasurementValueType. IntSum int64 `protobuf:"varint,5,opt,name=int_sum,json=intSum,proto3" json:"int_sum,omitempty"` DoubleSum float64 `protobuf:"fixed64,6,opt,name=double_sum,json=doubleSum,proto3" json:"double_sum,omitempty"` // bucket_counts is an optional field contains the count values of histogram // for each bucket. // // The sum of the bucket_counts must equal the value in the count field. // // The number of elements in bucket_counts array must be by one greater than // the number of elements in explicit_bounds array. BucketCounts []uint64 `protobuf:"varint,7,rep,packed,name=bucket_counts,json=bucketCounts,proto3" json:"bucket_counts,omitempty"` // explicit_bounds specifies buckets with explicitly defined bounds for values. // The bucket boundaries are described by "bounds" field. // // This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket // at index i are: // // (-infinity, bounds[i]) for i == 0 // [bounds[i-1], bounds[i]) for 0 < i < N-1 // [bounds[i], +infinity) for i == N-1 // The values in bounds array must be strictly increasing. // // Note: only [a, b) intervals are currently supported for each bucket except the first one. // If we decide to also support (a, b] intervals we should add support for these by defining // a boolean value which decides what type of intervals to use. ExplicitBounds []float64 `protobuf:"fixed64,8,rep,packed,name=explicit_bounds,json=explicitBounds,proto3" json:"explicit_bounds,omitempty"` // (Optional) List of exemplars collected from // measurements that were used to form the data point Exemplars []Exemplar `protobuf:"bytes,9,rep,name=exemplars,proto3" json:"exemplars"` }
HistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a Histogram. A Histogram contains summary statistics for a population of values, it may optionally contain the distribution of those values across a set of buckets.
func (*HistogramDataPoint) Descriptor ¶
func (*HistogramDataPoint) Descriptor() ([]byte, []int)
func (*HistogramDataPoint) GetBucketCounts ¶
func (m *HistogramDataPoint) GetBucketCounts() []uint64
func (*HistogramDataPoint) GetCount ¶
func (m *HistogramDataPoint) GetCount() uint64
func (*HistogramDataPoint) GetDoubleSum ¶
func (m *HistogramDataPoint) GetDoubleSum() float64
func (*HistogramDataPoint) GetExemplars ¶
func (m *HistogramDataPoint) GetExemplars() []Exemplar
func (*HistogramDataPoint) GetExplicitBounds ¶
func (m *HistogramDataPoint) GetExplicitBounds() []float64
func (*HistogramDataPoint) GetIntSum ¶
func (m *HistogramDataPoint) GetIntSum() int64
func (*HistogramDataPoint) GetLabels ¶
func (m *HistogramDataPoint) GetLabels() []v11.StringKeyValue
func (*HistogramDataPoint) GetStartTimeUnixNano ¶
func (m *HistogramDataPoint) GetStartTimeUnixNano() uint64
func (*HistogramDataPoint) GetTimeUnixNano ¶
func (m *HistogramDataPoint) GetTimeUnixNano() uint64
func (*HistogramDataPoint) Marshal ¶
func (m *HistogramDataPoint) Marshal() (dAtA []byte, err error)
func (*HistogramDataPoint) MarshalTo ¶
func (m *HistogramDataPoint) MarshalTo(dAtA []byte) (int, error)
func (*HistogramDataPoint) MarshalToSizedBuffer ¶
func (m *HistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*HistogramDataPoint) ProtoMessage ¶
func (*HistogramDataPoint) ProtoMessage()
func (*HistogramDataPoint) Reset ¶
func (m *HistogramDataPoint) Reset()
func (*HistogramDataPoint) Size ¶
func (m *HistogramDataPoint) Size() (n int)
func (*HistogramDataPoint) String ¶
func (m *HistogramDataPoint) String() string
func (*HistogramDataPoint) Unmarshal ¶
func (m *HistogramDataPoint) Unmarshal(dAtA []byte) error
func (*HistogramDataPoint) XXX_DiscardUnknown ¶
func (m *HistogramDataPoint) XXX_DiscardUnknown()
func (*HistogramDataPoint) XXX_Marshal ¶
func (m *HistogramDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HistogramDataPoint) XXX_Merge ¶
func (m *HistogramDataPoint) XXX_Merge(src proto.Message)
func (*HistogramDataPoint) XXX_Size ¶
func (m *HistogramDataPoint) XXX_Size() int
func (*HistogramDataPoint) XXX_Unmarshal ¶
func (m *HistogramDataPoint) XXX_Unmarshal(b []byte) error
type InstrumentationLibraryMetrics ¶
type InstrumentationLibraryMetrics struct { // The instrumentation library information for the metrics in this message. // If this field is not set then no library info is known. InstrumentationLibrary *v11.InstrumentationLibrary `` /* 127-byte string literal not displayed */ // A list of metrics that originate from an instrumentation library. Metrics []Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics"` }
A collection of Metrics produced by an InstrumentationLibrary.
func (*InstrumentationLibraryMetrics) Descriptor ¶
func (*InstrumentationLibraryMetrics) Descriptor() ([]byte, []int)
func (*InstrumentationLibraryMetrics) GetInstrumentationLibrary ¶
func (m *InstrumentationLibraryMetrics) GetInstrumentationLibrary() *v11.InstrumentationLibrary
func (*InstrumentationLibraryMetrics) GetMetrics ¶
func (m *InstrumentationLibraryMetrics) GetMetrics() []Metric
func (*InstrumentationLibraryMetrics) Marshal ¶
func (m *InstrumentationLibraryMetrics) Marshal() (dAtA []byte, err error)
func (*InstrumentationLibraryMetrics) MarshalTo ¶
func (m *InstrumentationLibraryMetrics) MarshalTo(dAtA []byte) (int, error)
func (*InstrumentationLibraryMetrics) MarshalToSizedBuffer ¶
func (m *InstrumentationLibraryMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*InstrumentationLibraryMetrics) ProtoMessage ¶
func (*InstrumentationLibraryMetrics) ProtoMessage()
func (*InstrumentationLibraryMetrics) Reset ¶
func (m *InstrumentationLibraryMetrics) Reset()
func (*InstrumentationLibraryMetrics) Size ¶
func (m *InstrumentationLibraryMetrics) Size() (n int)
func (*InstrumentationLibraryMetrics) String ¶
func (m *InstrumentationLibraryMetrics) String() string
func (*InstrumentationLibraryMetrics) Unmarshal ¶
func (m *InstrumentationLibraryMetrics) Unmarshal(dAtA []byte) error
func (*InstrumentationLibraryMetrics) XXX_DiscardUnknown ¶
func (m *InstrumentationLibraryMetrics) XXX_DiscardUnknown()
func (*InstrumentationLibraryMetrics) XXX_Marshal ¶
func (m *InstrumentationLibraryMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InstrumentationLibraryMetrics) XXX_Merge ¶
func (m *InstrumentationLibraryMetrics) XXX_Merge(src proto.Message)
func (*InstrumentationLibraryMetrics) XXX_Size ¶
func (m *InstrumentationLibraryMetrics) XXX_Size() int
func (*InstrumentationLibraryMetrics) XXX_Unmarshal ¶
func (m *InstrumentationLibraryMetrics) XXX_Unmarshal(b []byte) error
type MeasurementValueType ¶
type MeasurementValueType int32
MeasurementValueType determines the value type for a measurement.
const ( // UNSPECIFIED is the default MeasurementValueType, it MUST not be used. MeasurementValueType_MEASUREMENT_VALUE_TYPE_UNSPECIFIED MeasurementValueType = 0 // INT64 is the MeasurementValueType used when the measurements are int64. MeasurementValueType_MEASUREMENT_VALUE_TYPE_INT64 MeasurementValueType = 1 // DOUBLE is the MeasurementValueType used when the measurements are // floating point numbers. MeasurementValueType_MEASUREMENT_VALUE_TYPE_DOUBLE MeasurementValueType = 2 )
func (MeasurementValueType) EnumDescriptor ¶
func (MeasurementValueType) EnumDescriptor() ([]byte, []int)
func (MeasurementValueType) String ¶
func (x MeasurementValueType) String() string
type Metric ¶
type Metric struct { // name of the metric, including its DNS name prefix. It must be unique. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // description of the metric, which can be used in documentation. Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // unit in which the metric value is reported. Follows the format // described by http://unitsofmeasure.org/ucum.html. Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` // Data determines the aggregation type (if any) of the metric, what is the // reported value type for the data points, as well as the relatationship to // the time interval over which they are reported. // // TODO: Update table after the decision on: // https://github.com/open-telemetry/opentelemetry-specification/issues/731. // By default, metrics recording using the OpenTelemetry API are exported as // (the table does not include MeasurementValueType to avoid extra rows): // // Instrument Type // ---------------------------------------------- // Counter Sum(aggregation_temporality=delta;is_monotonic=true) // UpDownCounter Sum(aggregation_temporality=delta;is_monotonic=false) // ValueRecorder TBD // SumObserver Sum(aggregation_temporality=cumulative;is_monotonic=true) // UpDownSumObserver Sum(aggregation_temporality=cumulative;is_monotonic=false) // ValueObserver Gauge() // // Types that are valid to be assigned to Data: // *Metric_Gauge // *Metric_Sum // *Metric_Histogram Data isMetric_Data `protobuf_oneof:"data"` }
Defines a Metric which has one or more timeseries.
The data model and relation between entities is shown in the diagram below. Here, "DataPoint" is the term used to refer to any one of the specific data point value types, and "points" is the term used to refer to any one of the lists of points contained in the Metric.
Metric is composed of a metadata and data.
Metadata part contains a name, description, unit.
Data is one of the possible types (Gauge, Sum, Histogram, etc.).
DataPoint contains timestamps, labels, and one of the possible value type fields.
Metric +------------+ |name | |description | |unit | +---------------------------+ |data |---> |Gauge, Sum, Histogram, ... | +------------+ +---------------------------+
Data [One of Gauge, Sum, Histogram, ...] +-----------+ |... | // Metadata about the Data. |points |--+ +-----------+ | | +---------------------------+ | |DataPoint 1 | v |+------+------+ +------+ | +-----+ ||label |label |...|label | | | 1 |-->||value1|value2|...|valueN| | +-----+ |+------+------+ +------+ | | . | |+-----+ | | . | ||value| | | . | |+-----+ | | . | +---------------------------+ | . | . | . | . | . | . | . | +---------------------------+ | . | |DataPoint M | +-----+ |+------+------+ +------+ | | M |-->||label |label |...|label | | +-----+ ||value1|value2|...|valueN| | |+------+------+ +------+ | |+-----+ | ||value| | |+-----+ | +---------------------------+
All DataPoint types have three common fields:
- Labels zero or more key-value pairs associated with the data point.
- StartTimeUnixNano MUST be set to the start of the interval when the data's type includes an AggregationTemporality. This field is not set otherwise.
- TimeUnixNano MUST be set to:
- the moment when an aggregation is reported (independent of the aggregation temporality).
- the instantaneous time of the event.
func (*Metric) Descriptor ¶
func (*Metric) GetDescription ¶
func (*Metric) GetHistogram ¶
func (*Metric) MarshalToSizedBuffer ¶
func (*Metric) ProtoMessage ¶
func (*Metric) ProtoMessage()
func (*Metric) XXX_DiscardUnknown ¶
func (m *Metric) XXX_DiscardUnknown()
func (*Metric) XXX_Marshal ¶
func (*Metric) XXX_OneofWrappers ¶
func (*Metric) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Metric) XXX_Unmarshal ¶
type Metric_Gauge ¶
type Metric_Gauge struct {
Gauge *Gauge `protobuf:"bytes,4,opt,name=gauge,proto3,oneof" json:"gauge,omitempty"`
}
func (*Metric_Gauge) MarshalToSizedBuffer ¶
func (m *Metric_Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Metric_Gauge) Size ¶
func (m *Metric_Gauge) Size() (n int)
type Metric_Histogram ¶
type Metric_Histogram struct {
Histogram *Histogram `protobuf:"bytes,6,opt,name=histogram,proto3,oneof" json:"histogram,omitempty"`
}
func (*Metric_Histogram) MarshalToSizedBuffer ¶
func (m *Metric_Histogram) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Metric_Histogram) Size ¶
func (m *Metric_Histogram) Size() (n int)
type Metric_Sum ¶
type Metric_Sum struct {
Sum *Sum `protobuf:"bytes,5,opt,name=sum,proto3,oneof" json:"sum,omitempty"`
}
func (*Metric_Sum) MarshalToSizedBuffer ¶
func (m *Metric_Sum) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Metric_Sum) Size ¶
func (m *Metric_Sum) Size() (n int)
type ResourceMetrics ¶
type ResourceMetrics struct { // The resource for the metrics in this message. // If this field is not set then no resource info is known. Resource *v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` // A list of metrics that originate from a resource. InstrumentationLibraryMetrics []InstrumentationLibraryMetrics `` /* 140-byte string literal not displayed */ }
A collection of InstrumentationLibraryMetrics from a Resource.
func (*ResourceMetrics) Descriptor ¶
func (*ResourceMetrics) Descriptor() ([]byte, []int)
func (*ResourceMetrics) GetInstrumentationLibraryMetrics ¶
func (m *ResourceMetrics) GetInstrumentationLibraryMetrics() []InstrumentationLibraryMetrics
func (*ResourceMetrics) GetResource ¶
func (m *ResourceMetrics) GetResource() *v1.Resource
func (*ResourceMetrics) Marshal ¶
func (m *ResourceMetrics) Marshal() (dAtA []byte, err error)
func (*ResourceMetrics) MarshalToSizedBuffer ¶
func (m *ResourceMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ResourceMetrics) ProtoMessage ¶
func (*ResourceMetrics) ProtoMessage()
func (*ResourceMetrics) Reset ¶
func (m *ResourceMetrics) Reset()
func (*ResourceMetrics) Size ¶
func (m *ResourceMetrics) Size() (n int)
func (*ResourceMetrics) String ¶
func (m *ResourceMetrics) String() string
func (*ResourceMetrics) Unmarshal ¶
func (m *ResourceMetrics) Unmarshal(dAtA []byte) error
func (*ResourceMetrics) XXX_DiscardUnknown ¶
func (m *ResourceMetrics) XXX_DiscardUnknown()
func (*ResourceMetrics) XXX_Marshal ¶
func (m *ResourceMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResourceMetrics) XXX_Merge ¶
func (m *ResourceMetrics) XXX_Merge(src proto.Message)
func (*ResourceMetrics) XXX_Size ¶
func (m *ResourceMetrics) XXX_Size() int
func (*ResourceMetrics) XXX_Unmarshal ¶
func (m *ResourceMetrics) XXX_Unmarshal(b []byte) error
type ScalarDataPoint ¶
type ScalarDataPoint struct { // The set of labels that uniquely identify this timeseries. Labels []v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels"` // start_time_unix_nano is the last time when the aggregation value was reset // to "zero". For some metric types this is ignored, see data types for more // details. // // The aggregation value is over the time interval (start_time_unix_nano, // time_unix_nano]. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970. // // Value of 0 indicates that the timestamp is unspecified. In that case the // timestamp may be decided by the backend. StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` // time_unix_nano is the moment when this aggregation value was reported. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970. TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` // value itself. DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"` Int64Value int64 `protobuf:"varint,5,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"` // (Optional) List of exemplars collected from // measurements that were used to form the data point Exemplars []Exemplar `protobuf:"bytes,6,rep,name=exemplars,proto3" json:"exemplars"` }
ScalarDataPoint is a single data point in a timeseries that describes the time-varying values of a scalar metric.
func (*ScalarDataPoint) Descriptor ¶
func (*ScalarDataPoint) Descriptor() ([]byte, []int)
func (*ScalarDataPoint) GetDoubleValue ¶
func (m *ScalarDataPoint) GetDoubleValue() float64
func (*ScalarDataPoint) GetExemplars ¶
func (m *ScalarDataPoint) GetExemplars() []Exemplar
func (*ScalarDataPoint) GetInt64Value ¶
func (m *ScalarDataPoint) GetInt64Value() int64
func (*ScalarDataPoint) GetLabels ¶
func (m *ScalarDataPoint) GetLabels() []v11.StringKeyValue
func (*ScalarDataPoint) GetStartTimeUnixNano ¶
func (m *ScalarDataPoint) GetStartTimeUnixNano() uint64
func (*ScalarDataPoint) GetTimeUnixNano ¶
func (m *ScalarDataPoint) GetTimeUnixNano() uint64
func (*ScalarDataPoint) Marshal ¶
func (m *ScalarDataPoint) Marshal() (dAtA []byte, err error)
func (*ScalarDataPoint) MarshalToSizedBuffer ¶
func (m *ScalarDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ScalarDataPoint) ProtoMessage ¶
func (*ScalarDataPoint) ProtoMessage()
func (*ScalarDataPoint) Reset ¶
func (m *ScalarDataPoint) Reset()
func (*ScalarDataPoint) Size ¶
func (m *ScalarDataPoint) Size() (n int)
func (*ScalarDataPoint) String ¶
func (m *ScalarDataPoint) String() string
func (*ScalarDataPoint) Unmarshal ¶
func (m *ScalarDataPoint) Unmarshal(dAtA []byte) error
func (*ScalarDataPoint) XXX_DiscardUnknown ¶
func (m *ScalarDataPoint) XXX_DiscardUnknown()
func (*ScalarDataPoint) XXX_Marshal ¶
func (m *ScalarDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ScalarDataPoint) XXX_Merge ¶
func (m *ScalarDataPoint) XXX_Merge(src proto.Message)
func (*ScalarDataPoint) XXX_Size ¶
func (m *ScalarDataPoint) XXX_Size() int
func (*ScalarDataPoint) XXX_Unmarshal ¶
func (m *ScalarDataPoint) XXX_Unmarshal(b []byte) error
type Sum ¶
type Sum struct { DataPoints []ScalarDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points"` // It describes the value type of the measurement used to build this // aggregation. // // Determines if the points are Int64DataPoint or DoubleDataPoint, as well // as the value type of the exemplars. MeasurementValueType MeasurementValueType `` /* 174-byte string literal not displayed */ // aggregation_temporality describes if the aggregator reports delta changes // since last report time, or cumulative changes since a fixed start time. AggregationTemporality AggregationTemporality `` /* 180-byte string literal not displayed */ // If "true" means that the sum is monotonic. IsMonotonic bool `protobuf:"varint,4,opt,name=is_monotonic,json=isMonotonic,proto3" json:"is_monotonic,omitempty"` }
Sum represents the type of a numeric scalar metric that is calculated as a sum of all reported measurements over a time interval.
func (*Sum) Descriptor ¶
func (*Sum) GetAggregationTemporality ¶
func (m *Sum) GetAggregationTemporality() AggregationTemporality
func (*Sum) GetDataPoints ¶
func (m *Sum) GetDataPoints() []ScalarDataPoint
func (*Sum) GetIsMonotonic ¶
func (*Sum) GetMeasurementValueType ¶
func (m *Sum) GetMeasurementValueType() MeasurementValueType
func (*Sum) ProtoMessage ¶
func (*Sum) ProtoMessage()
func (*Sum) XXX_DiscardUnknown ¶
func (m *Sum) XXX_DiscardUnknown()