v1

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MetricDescriptor_Type_name = map[int32]string{
	0: "UNSPECIFIED",
	1: "GAUGE_INT64",
	2: "GAUGE_DOUBLE",
	3: "GAUGE_HISTOGRAM",
	4: "COUNTER_INT64",
	5: "COUNTER_DOUBLE",
	6: "CUMULATIVE_HISTOGRAM",
	7: "SUMMARY",
}
View Source
var MetricDescriptor_Type_value = map[string]int32{
	"UNSPECIFIED":          0,
	"GAUGE_INT64":          1,
	"GAUGE_DOUBLE":         2,
	"GAUGE_HISTOGRAM":      3,
	"COUNTER_INT64":        4,
	"COUNTER_DOUBLE":       5,
	"CUMULATIVE_HISTOGRAM": 6,
	"SUMMARY":              7,
}

Functions

This section is empty.

Types

type DoubleDataPoint

type DoubleDataPoint struct {
	// The set of labels that uniquely identify this timeseries.
	Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"`
	// start_time_unix_nano is the time when the cumulative value was reset to zero.
	// This is used for Counter type only. For Gauge the value is not specified and
	// defaults to 0.
	//
	// The cumulative 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 value was recorded.
	// 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.
	Value                float64  `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

DoubleDataPoint is a single data point in a timeseries that describes the time-varying value of a double metric.

func (*DoubleDataPoint) Descriptor

func (*DoubleDataPoint) Descriptor() ([]byte, []int)

func (*DoubleDataPoint) GetLabels

func (m *DoubleDataPoint) GetLabels() []*v11.StringKeyValue

func (*DoubleDataPoint) GetStartTimeUnixNano

func (m *DoubleDataPoint) GetStartTimeUnixNano() uint64

func (*DoubleDataPoint) GetTimeUnixNano

func (m *DoubleDataPoint) GetTimeUnixNano() uint64

func (*DoubleDataPoint) GetValue

func (m *DoubleDataPoint) GetValue() float64

func (*DoubleDataPoint) ProtoMessage

func (*DoubleDataPoint) ProtoMessage()

func (*DoubleDataPoint) Reset

func (m *DoubleDataPoint) Reset()

func (*DoubleDataPoint) String

func (m *DoubleDataPoint) String() string

func (*DoubleDataPoint) XXX_DiscardUnknown

func (m *DoubleDataPoint) XXX_DiscardUnknown()

func (*DoubleDataPoint) XXX_Marshal

func (m *DoubleDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DoubleDataPoint) XXX_Merge

func (m *DoubleDataPoint) XXX_Merge(src proto.Message)

func (*DoubleDataPoint) XXX_Size

func (m *DoubleDataPoint) XXX_Size() int

func (*DoubleDataPoint) XXX_Unmarshal

func (m *DoubleDataPoint) XXX_Unmarshal(b []byte) error

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,omitempty"`
	// start_time_unix_nano is the time when the cumulative value was reset to zero.
	//
	// The cumulative 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.
	// Note: this field is always unspecified and ignored if MetricDescriptor.type==GAUGE_HISTOGRAM.
	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 value was recorded.
	// 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.
	Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3" json:"sum,omitempty"`
	// buckets is an optional field contains the values of histogram for each bucket.
	//
	// The sum of the values in the buckets "count" field must equal the value in the count field.
	//
	// The number of elements in buckets array must be by one greater than the
	// number of elements in bucket_bounds array.
	//
	// Note: if HistogramDataPoint.bucket_options defines bucket bounds then this field
	// must also be present and number of elements in this field must be equal to the
	// number of buckets defined by bucket_options.
	Buckets []*HistogramDataPoint_Bucket `protobuf:"bytes,6,rep,name=buckets,proto3" json:"buckets,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:
	//
	// [0, 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 and > 0.
	//
	// Note: only [a, b) intervals are currently supported for each bucket. If we decides
	// 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,7,rep,packed,name=explicit_bounds,json=explicitBounds,proto3" json:"explicit_bounds,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

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) GetBuckets

func (m *HistogramDataPoint) GetBuckets() []*HistogramDataPoint_Bucket

func (*HistogramDataPoint) GetCount

func (m *HistogramDataPoint) GetCount() uint64

func (*HistogramDataPoint) GetExplicitBounds

func (m *HistogramDataPoint) GetExplicitBounds() []float64

func (*HistogramDataPoint) GetLabels

func (m *HistogramDataPoint) GetLabels() []*v11.StringKeyValue

func (*HistogramDataPoint) GetStartTimeUnixNano

func (m *HistogramDataPoint) GetStartTimeUnixNano() uint64

func (*HistogramDataPoint) GetSum

func (m *HistogramDataPoint) GetSum() float64

func (*HistogramDataPoint) GetTimeUnixNano

func (m *HistogramDataPoint) GetTimeUnixNano() uint64

func (*HistogramDataPoint) ProtoMessage

func (*HistogramDataPoint) ProtoMessage()

func (*HistogramDataPoint) Reset

func (m *HistogramDataPoint) Reset()

func (*HistogramDataPoint) String

func (m *HistogramDataPoint) String() string

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 HistogramDataPoint_Bucket

type HistogramDataPoint_Bucket struct {
	// The number of values in each bucket of the histogram, as described by
	// bucket_options.
	Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// exemplar is an optional representative value of the bucket.
	Exemplar             *HistogramDataPoint_Bucket_Exemplar `protobuf:"bytes,2,opt,name=exemplar,proto3" json:"exemplar,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                            `json:"-"`
	XXX_unrecognized     []byte                              `json:"-"`
	XXX_sizecache        int32                               `json:"-"`
}

Bucket contains values for a bucket.

func (*HistogramDataPoint_Bucket) Descriptor

func (*HistogramDataPoint_Bucket) Descriptor() ([]byte, []int)

func (*HistogramDataPoint_Bucket) GetCount

func (m *HistogramDataPoint_Bucket) GetCount() uint64

func (*HistogramDataPoint_Bucket) GetExemplar

func (*HistogramDataPoint_Bucket) ProtoMessage

func (*HistogramDataPoint_Bucket) ProtoMessage()

func (*HistogramDataPoint_Bucket) Reset

func (m *HistogramDataPoint_Bucket) Reset()

func (*HistogramDataPoint_Bucket) String

func (m *HistogramDataPoint_Bucket) String() string

func (*HistogramDataPoint_Bucket) XXX_DiscardUnknown

func (m *HistogramDataPoint_Bucket) XXX_DiscardUnknown()

func (*HistogramDataPoint_Bucket) XXX_Marshal

func (m *HistogramDataPoint_Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HistogramDataPoint_Bucket) XXX_Merge

func (m *HistogramDataPoint_Bucket) XXX_Merge(src proto.Message)

func (*HistogramDataPoint_Bucket) XXX_Size

func (m *HistogramDataPoint_Bucket) XXX_Size() int

func (*HistogramDataPoint_Bucket) XXX_Unmarshal

func (m *HistogramDataPoint_Bucket) XXX_Unmarshal(b []byte) error

type HistogramDataPoint_Bucket_Exemplar

type HistogramDataPoint_Bucket_Exemplar struct {
	// Value of the exemplar point. It determines which bucket the exemplar belongs to.
	// If bucket_options define bounds for this bucket then this value must be within
	// the defined bounds.
	Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
	// time_unix_nano is the moment 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"`
	// exemplar_attachments are contextual information about the example value.
	// Keys in this list must be unique.
	Attachments          []*v11.StringKeyValue `protobuf:"bytes,3,rep,name=attachments,proto3" json:"attachments,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

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

func (*HistogramDataPoint_Bucket_Exemplar) Descriptor

func (*HistogramDataPoint_Bucket_Exemplar) Descriptor() ([]byte, []int)

func (*HistogramDataPoint_Bucket_Exemplar) GetAttachments

func (m *HistogramDataPoint_Bucket_Exemplar) GetAttachments() []*v11.StringKeyValue

func (*HistogramDataPoint_Bucket_Exemplar) GetTimeUnixNano

func (m *HistogramDataPoint_Bucket_Exemplar) GetTimeUnixNano() uint64

func (*HistogramDataPoint_Bucket_Exemplar) GetValue

func (*HistogramDataPoint_Bucket_Exemplar) ProtoMessage

func (*HistogramDataPoint_Bucket_Exemplar) ProtoMessage()

func (*HistogramDataPoint_Bucket_Exemplar) Reset

func (*HistogramDataPoint_Bucket_Exemplar) String

func (*HistogramDataPoint_Bucket_Exemplar) XXX_DiscardUnknown

func (m *HistogramDataPoint_Bucket_Exemplar) XXX_DiscardUnknown()

func (*HistogramDataPoint_Bucket_Exemplar) XXX_Marshal

func (m *HistogramDataPoint_Bucket_Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HistogramDataPoint_Bucket_Exemplar) XXX_Merge

func (*HistogramDataPoint_Bucket_Exemplar) XXX_Size

func (*HistogramDataPoint_Bucket_Exemplar) XXX_Unmarshal

func (m *HistogramDataPoint_Bucket_Exemplar) 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,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

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) ProtoMessage

func (*InstrumentationLibraryMetrics) ProtoMessage()

func (*InstrumentationLibraryMetrics) Reset

func (m *InstrumentationLibraryMetrics) Reset()

func (*InstrumentationLibraryMetrics) String

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 Int64DataPoint

type Int64DataPoint struct {
	// The set of labels that uniquely identify this timeseries.
	Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"`
	// start_time_unix_nano is the time when the cumulative value was reset to zero.
	// This is used for Counter type only. For Gauge the value is not specified and
	// defaults to 0.
	//
	// The cumulative 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 value was recorded.
	// 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.
	Value                int64    `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Int64DataPoint is a single data point in a timeseries that describes the time-varying values of a int64 metric.

func (*Int64DataPoint) Descriptor

func (*Int64DataPoint) Descriptor() ([]byte, []int)

func (*Int64DataPoint) GetLabels

func (m *Int64DataPoint) GetLabels() []*v11.StringKeyValue

func (*Int64DataPoint) GetStartTimeUnixNano

func (m *Int64DataPoint) GetStartTimeUnixNano() uint64

func (*Int64DataPoint) GetTimeUnixNano

func (m *Int64DataPoint) GetTimeUnixNano() uint64

func (*Int64DataPoint) GetValue

func (m *Int64DataPoint) GetValue() int64

func (*Int64DataPoint) ProtoMessage

func (*Int64DataPoint) ProtoMessage()

func (*Int64DataPoint) Reset

func (m *Int64DataPoint) Reset()

func (*Int64DataPoint) String

func (m *Int64DataPoint) String() string

func (*Int64DataPoint) XXX_DiscardUnknown

func (m *Int64DataPoint) XXX_DiscardUnknown()

func (*Int64DataPoint) XXX_Marshal

func (m *Int64DataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Int64DataPoint) XXX_Merge

func (m *Int64DataPoint) XXX_Merge(src proto.Message)

func (*Int64DataPoint) XXX_Size

func (m *Int64DataPoint) XXX_Size() int

func (*Int64DataPoint) XXX_Unmarshal

func (m *Int64DataPoint) XXX_Unmarshal(b []byte) error

type Metric

type Metric struct {
	// metric_descriptor describes the Metric.
	MetricDescriptor *MetricDescriptor `protobuf:"bytes,1,opt,name=metric_descriptor,json=metricDescriptor,proto3" json:"metric_descriptor,omitempty"`
	// Data is a list of one or more DataPoints for a single metric. Only one of the
	// following fields is used for the data, depending on the type of the metric defined
	// by MetricDescriptor.type field.
	Int64DataPoints      []*Int64DataPoint     `protobuf:"bytes,2,rep,name=int64_data_points,json=int64DataPoints,proto3" json:"int64_data_points,omitempty"`
	DoubleDataPoints     []*DoubleDataPoint    `protobuf:"bytes,3,rep,name=double_data_points,json=doubleDataPoints,proto3" json:"double_data_points,omitempty"`
	HistogramDataPoints  []*HistogramDataPoint `protobuf:"bytes,4,rep,name=histogram_data_points,json=histogramDataPoints,proto3" json:"histogram_data_points,omitempty"`
	SummaryDataPoints    []*SummaryDataPoint   `protobuf:"bytes,5,rep,name=summary_data_points,json=summaryDataPoints,proto3" json:"summary_data_points,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

Defines a Metric which has one or more timeseries.

The data model and relation between entities is shown in the diagram below.

- Metric is composed of a MetricDescriptor and a list of data points. - MetricDescriptor contains a list of label keys (shown horizontally). - Data is a list of DataPoints (shown vertically). - DataPoint contains a list of label values and a value.

   Metric
+----------+         +------------------------+
|descriptor|-------->| MetricDescriptor       |
|          |         |+-----+-----+   +-----+ |
|          |         ||label|label|...|label| |
|      data|--+      ||key1 |key2 |   |keyN | |
+----------+  |      |+-----+-----+   +-----+ |
              |      +------------------------+
              |
              |      +---------------------------+
              |      |DataPoint 1                |
              v      |+------+------+   +------+ |
           +-----+   ||label |label |...|label | |
           |  1  |-->||value1|value2|...|valueN| |
           +-----+   |+------+------+   +------+ |
           |  .  |   |+-----+                    |
           |  .  |   ||value|                    |
           |  .  |   |+-----+                    |
           |  .  |   +---------------------------+
           |  .  |                   .
           |  .  |                   .
           |  .  |                   .
           |  .  |   +---------------------------+
           |  .  |   |DataPoint M                |
           +-----+   |+------+------+   +------+ |
           |  M  |-->||label |label |...|label | |
           +-----+   ||value1|value2|...|valueN| |
                     |+------+------+   +------+ |
                     |+-----+                    |
                     ||value|                    |
                     |+-----+                    |
                     +---------------------------+

----------------------------------------------------------------------- DataPoint is a value of specific type corresponding to a given moment in time. Each DataPoint is timestamped.

DataPoint is strongly typed: each DataPoint type has a specific Protobuf message depending on the value type of the metric and thus there are currently 4 DataPoint messages, which correspond to the types of metric values.

func (*Metric) Descriptor

func (*Metric) Descriptor() ([]byte, []int)

func (*Metric) GetDoubleDataPoints

func (m *Metric) GetDoubleDataPoints() []*DoubleDataPoint

func (*Metric) GetHistogramDataPoints

func (m *Metric) GetHistogramDataPoints() []*HistogramDataPoint

func (*Metric) GetInt64DataPoints

func (m *Metric) GetInt64DataPoints() []*Int64DataPoint

func (*Metric) GetMetricDescriptor

func (m *Metric) GetMetricDescriptor() *MetricDescriptor

func (*Metric) GetSummaryDataPoints

func (m *Metric) GetSummaryDataPoints() []*SummaryDataPoint

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) Reset

func (m *Metric) Reset()

func (*Metric) String

func (m *Metric) String() string

func (*Metric) XXX_DiscardUnknown

func (m *Metric) XXX_DiscardUnknown()

func (*Metric) XXX_Marshal

func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metric) XXX_Merge

func (m *Metric) XXX_Merge(src proto.Message)

func (*Metric) XXX_Size

func (m *Metric) XXX_Size() int

func (*Metric) XXX_Unmarshal

func (m *Metric) XXX_Unmarshal(b []byte) error

type MetricDescriptor

type MetricDescriptor 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"`
	Type MetricDescriptor_Type `protobuf:"varint,4,opt,name=type,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Type" json:"type,omitempty"`
	// The set of labels associated with the metric descriptor. Labels in this list apply to
	// all data points.
	Labels               []*v11.StringKeyValue `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

Defines a metric type and its schema.

func (*MetricDescriptor) Descriptor

func (*MetricDescriptor) Descriptor() ([]byte, []int)

func (*MetricDescriptor) GetDescription

func (m *MetricDescriptor) GetDescription() string

func (*MetricDescriptor) GetLabels

func (m *MetricDescriptor) GetLabels() []*v11.StringKeyValue

func (*MetricDescriptor) GetName

func (m *MetricDescriptor) GetName() string

func (*MetricDescriptor) GetType

func (*MetricDescriptor) GetUnit

func (m *MetricDescriptor) GetUnit() string

func (*MetricDescriptor) ProtoMessage

func (*MetricDescriptor) ProtoMessage()

func (*MetricDescriptor) Reset

func (m *MetricDescriptor) Reset()

func (*MetricDescriptor) String

func (m *MetricDescriptor) String() string

func (*MetricDescriptor) XXX_DiscardUnknown

func (m *MetricDescriptor) XXX_DiscardUnknown()

func (*MetricDescriptor) XXX_Marshal

func (m *MetricDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricDescriptor) XXX_Merge

func (m *MetricDescriptor) XXX_Merge(src proto.Message)

func (*MetricDescriptor) XXX_Size

func (m *MetricDescriptor) XXX_Size() int

func (*MetricDescriptor) XXX_Unmarshal

func (m *MetricDescriptor) XXX_Unmarshal(b []byte) error

type MetricDescriptor_Type

type MetricDescriptor_Type int32

Type of the metric. It describes how the data is reported.

A gauge is an instantaneous measurement of a value.

A counter/cumulative measurement is a value accumulated over a time interval. In a time series, cumulative measurements should have the same start time, increasing values, until an event resets the cumulative value to zero and sets a new start time for the subsequent points.

const (
	// Do not use this default value.
	MetricDescriptor_UNSPECIFIED MetricDescriptor_Type = 0
	// Integer gauge. The value can go both up and down over time.
	// Corresponding values are stored in Int64DataPoint.
	MetricDescriptor_GAUGE_INT64 MetricDescriptor_Type = 1
	// Floating point gauge. The value can go both up and down over time.
	// Corresponding values are stored in DoubleDataPoint.
	MetricDescriptor_GAUGE_DOUBLE MetricDescriptor_Type = 2
	// Histogram gauge measurement.
	// Used in scenarios like a snapshot of time that current items in a queue
	// have spent there.
	// Corresponding values are stored in HistogramDataPoint. The count and sum of the
	// histogram can go both up and down over time. Recorded values are always >= 0.
	MetricDescriptor_GAUGE_HISTOGRAM MetricDescriptor_Type = 3
	// Integer counter measurement. The value cannot decrease; if value is reset then
	// start_time_unix_nano should also be reset.
	// Corresponding values are stored in Int64DataPoint.
	MetricDescriptor_COUNTER_INT64 MetricDescriptor_Type = 4
	// Floating point counter measurement. The value cannot decrease, if
	// resets then the start_time_unix_nano should also be reset.
	// Recorded values are always >= 0.
	// Corresponding values are stored in DoubleDataPoint.
	MetricDescriptor_COUNTER_DOUBLE MetricDescriptor_Type = 5
	// Histogram cumulative measurement.
	// Corresponding values are stored in HistogramDataPoint. The count and sum of the
	// histogram cannot decrease; if values are reset then start_time_unix_nano
	// should also be reset to the new start timestamp.
	MetricDescriptor_CUMULATIVE_HISTOGRAM MetricDescriptor_Type = 6
	// Summary value. Some frameworks implemented Histograms as a summary of observations
	// (usually things like request durations and response sizes). While it
	// also provides a total count of observations and a sum of all observed
	// values, it calculates configurable percentiles over a sliding time
	// window.
	// Corresponding values are stored in SummaryDataPoint.
	MetricDescriptor_SUMMARY MetricDescriptor_Type = 7
)

func (MetricDescriptor_Type) EnumDescriptor

func (MetricDescriptor_Type) EnumDescriptor() ([]byte, []int)

func (MetricDescriptor_Type) String

func (x MetricDescriptor_Type) String() string

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 `` /* 150-byte string literal not displayed */
	XXX_NoUnkeyedLiteral          struct{}                         `json:"-"`
	XXX_unrecognized              []byte                           `json:"-"`
	XXX_sizecache                 int32                            `json:"-"`
}

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) ProtoMessage

func (*ResourceMetrics) ProtoMessage()

func (*ResourceMetrics) Reset

func (m *ResourceMetrics) Reset()

func (*ResourceMetrics) String

func (m *ResourceMetrics) String() string

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 SummaryDataPoint

type SummaryDataPoint struct {
	// The set of labels that uniquely identify this timeseries.
	Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"`
	// start_time_unix_nano is the time when the cumulative value was reset to zero.
	//
	// The cumulative 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 value was recorded.
	// 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"`
	// The total number of recorded values since start_time. Optional since
	// some systems don't expose this.
	Count uint64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	// The total sum of recorded values since start_time. Optional since some
	// systems don't expose this. If count is zero then this field must be zero.
	Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3" json:"sum,omitempty"`
	// A list of values at different percentiles of the distribution calculated
	// from the current snapshot. The percentiles must be strictly increasing.
	PercentileValues     []*SummaryDataPoint_ValueAtPercentile `protobuf:"bytes,6,rep,name=percentile_values,json=percentileValues,proto3" json:"percentile_values,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                              `json:"-"`
	XXX_unrecognized     []byte                                `json:"-"`
	XXX_sizecache        int32                                 `json:"-"`
}

SummaryDataPoint is a single data point in a timeseries that describes the time-varying values of a Summary metric.

func (*SummaryDataPoint) Descriptor

func (*SummaryDataPoint) Descriptor() ([]byte, []int)

func (*SummaryDataPoint) GetCount

func (m *SummaryDataPoint) GetCount() uint64

func (*SummaryDataPoint) GetLabels

func (m *SummaryDataPoint) GetLabels() []*v11.StringKeyValue

func (*SummaryDataPoint) GetPercentileValues

func (m *SummaryDataPoint) GetPercentileValues() []*SummaryDataPoint_ValueAtPercentile

func (*SummaryDataPoint) GetStartTimeUnixNano

func (m *SummaryDataPoint) GetStartTimeUnixNano() uint64

func (*SummaryDataPoint) GetSum

func (m *SummaryDataPoint) GetSum() float64

func (*SummaryDataPoint) GetTimeUnixNano

func (m *SummaryDataPoint) GetTimeUnixNano() uint64

func (*SummaryDataPoint) ProtoMessage

func (*SummaryDataPoint) ProtoMessage()

func (*SummaryDataPoint) Reset

func (m *SummaryDataPoint) Reset()

func (*SummaryDataPoint) String

func (m *SummaryDataPoint) String() string

func (*SummaryDataPoint) XXX_DiscardUnknown

func (m *SummaryDataPoint) XXX_DiscardUnknown()

func (*SummaryDataPoint) XXX_Marshal

func (m *SummaryDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SummaryDataPoint) XXX_Merge

func (m *SummaryDataPoint) XXX_Merge(src proto.Message)

func (*SummaryDataPoint) XXX_Size

func (m *SummaryDataPoint) XXX_Size() int

func (*SummaryDataPoint) XXX_Unmarshal

func (m *SummaryDataPoint) XXX_Unmarshal(b []byte) error

type SummaryDataPoint_ValueAtPercentile

type SummaryDataPoint_ValueAtPercentile struct {
	// The percentile of a distribution. Must be in the interval
	// [0.0, 100.0].
	Percentile float64 `protobuf:"fixed64,1,opt,name=percentile,proto3" json:"percentile,omitempty"`
	// The value at the given percentile of a distribution.
	Value                float64  `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Represents the value at a given percentile of a distribution.

To record Min and Max values following conventions are used: - The 100th percentile is equivalent to the maximum value observed. - The 0th percentile is equivalent to the minimum value observed.

See the following issue for more context: https://github.com/open-telemetry/opentelemetry-proto/issues/125

func (*SummaryDataPoint_ValueAtPercentile) Descriptor

func (*SummaryDataPoint_ValueAtPercentile) Descriptor() ([]byte, []int)

func (*SummaryDataPoint_ValueAtPercentile) GetPercentile

func (m *SummaryDataPoint_ValueAtPercentile) GetPercentile() float64

func (*SummaryDataPoint_ValueAtPercentile) GetValue

func (*SummaryDataPoint_ValueAtPercentile) ProtoMessage

func (*SummaryDataPoint_ValueAtPercentile) ProtoMessage()

func (*SummaryDataPoint_ValueAtPercentile) Reset

func (*SummaryDataPoint_ValueAtPercentile) String

func (*SummaryDataPoint_ValueAtPercentile) XXX_DiscardUnknown

func (m *SummaryDataPoint_ValueAtPercentile) XXX_DiscardUnknown()

func (*SummaryDataPoint_ValueAtPercentile) XXX_Marshal

func (m *SummaryDataPoint_ValueAtPercentile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SummaryDataPoint_ValueAtPercentile) XXX_Merge

func (*SummaryDataPoint_ValueAtPercentile) XXX_Size

func (*SummaryDataPoint_ValueAtPercentile) XXX_Unmarshal

func (m *SummaryDataPoint_ValueAtPercentile) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL