io_prometheus_client
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Variables
- type Bucket
- func (*Bucket) Descriptor() ([]byte, []int)deprecated
- func (x *Bucket) GetCumulativeCount() uint64
- func (x *Bucket) GetCumulativeCountFloat() float64
- func (x *Bucket) GetExemplar() *Exemplar
- func (x *Bucket) GetUpperBound() float64
- func (*Bucket) ProtoMessage()
- func (x *Bucket) ProtoReflect() protoreflect.Message
- func (x *Bucket) Reset()
- func (x *Bucket) String() string
- type BucketSpan
- type Counter
- func (*Counter) Descriptor() ([]byte, []int)deprecated
- func (x *Counter) GetCreatedTimestamp() *timestamppb.Timestamp
- func (x *Counter) GetExemplar() *Exemplar
- func (x *Counter) GetValue() float64
- func (*Counter) ProtoMessage()
- func (x *Counter) ProtoReflect() protoreflect.Message
- func (x *Counter) Reset()
- func (x *Counter) String() string
- type Exemplar
- func (*Exemplar) Descriptor() ([]byte, []int)deprecated
- func (x *Exemplar) GetLabel() []*LabelPair
- func (x *Exemplar) GetTimestamp() *timestamppb.Timestamp
- func (x *Exemplar) GetValue() float64
- func (*Exemplar) ProtoMessage()
- func (x *Exemplar) ProtoReflect() protoreflect.Message
- func (x *Exemplar) Reset()
- func (x *Exemplar) String() string
- type Gauge
- type Histogram
- func (*Histogram) Descriptor() ([]byte, []int)deprecated
- func (x *Histogram) GetBucket() []*Bucket
- func (x *Histogram) GetCreatedTimestamp() *timestamppb.Timestamp
- func (x *Histogram) GetExemplars() []*Exemplar
- func (x *Histogram) GetNegativeCount() []float64
- func (x *Histogram) GetNegativeDelta() []int64
- func (x *Histogram) GetNegativeSpan() []*BucketSpan
- func (x *Histogram) GetPositiveCount() []float64
- func (x *Histogram) GetPositiveDelta() []int64
- func (x *Histogram) GetPositiveSpan() []*BucketSpan
- func (x *Histogram) GetSampleCount() uint64
- func (x *Histogram) GetSampleCountFloat() float64
- func (x *Histogram) GetSampleSum() float64
- func (x *Histogram) GetSchema() int32
- func (x *Histogram) GetZeroCount() uint64
- func (x *Histogram) GetZeroCountFloat() float64
- func (x *Histogram) GetZeroThreshold() float64
- func (*Histogram) ProtoMessage()
- func (x *Histogram) ProtoReflect() protoreflect.Message
- func (x *Histogram) Reset()
- func (x *Histogram) String() string
- type LabelPair
- type Metric
- func (*Metric) Descriptor() ([]byte, []int)deprecated
- func (x *Metric) GetCounter() *Counter
- func (x *Metric) GetGauge() *Gauge
- func (x *Metric) GetHistogram() *Histogram
- func (x *Metric) GetLabel() []*LabelPair
- func (x *Metric) GetSummary() *Summary
- func (x *Metric) GetTimestampMs() int64
- func (x *Metric) GetUntyped() *Untyped
- func (*Metric) ProtoMessage()
- func (x *Metric) ProtoReflect() protoreflect.Message
- func (x *Metric) Reset()
- func (x *Metric) String() string
- type MetricFamily
- func (*MetricFamily) Descriptor() ([]byte, []int)deprecated
- func (x *MetricFamily) GetHelp() string
- func (x *MetricFamily) GetMetric() []*Metric
- func (x *MetricFamily) GetName() string
- func (x *MetricFamily) GetType() MetricType
- func (x *MetricFamily) GetUnit() string
- func (*MetricFamily) ProtoMessage()
- func (x *MetricFamily) ProtoReflect() protoreflect.Message
- func (x *MetricFamily) Reset()
- func (x *MetricFamily) String() string
- type MetricType
- func (MetricType) Descriptor() protoreflect.EnumDescriptor
- func (x MetricType) Enum() *MetricType
- func (MetricType) EnumDescriptor() ([]byte, []int)deprecated
- func (x MetricType) Number() protoreflect.EnumNumber
- func (x MetricType) String() string
- func (MetricType) Type() protoreflect.EnumType
- func (x *MetricType) UnmarshalJSON(b []byte) errordeprecated
- type Quantile
- type Summary
- func (*Summary) Descriptor() ([]byte, []int)deprecated
- func (x *Summary) GetCreatedTimestamp() *timestamppb.Timestamp
- func (x *Summary) GetQuantile() []*Quantile
- func (x *Summary) GetSampleCount() uint64
- func (x *Summary) GetSampleSum() float64
- func (*Summary) ProtoMessage()
- func (x *Summary) ProtoReflect() protoreflect.Message
- func (x *Summary) Reset()
- func (x *Summary) String() string
- type Untyped
Constants¶
This section is empty.
Variables¶
var (MetricType_name = map[int32]string{0: "COUNTER",1: "GAUGE",2: "SUMMARY",3: "UNTYPED",4: "HISTOGRAM",5: "GAUGE_HISTOGRAM",}MetricType_value = map[string]int32{"COUNTER": 0,"GAUGE": 1,"SUMMARY": 2,"UNTYPED": 3,"HISTOGRAM": 4,"GAUGE_HISTOGRAM": 5,})
Enum value maps for MetricType.
var File_io_prometheus_client_metrics_protoprotoreflect.FileDescriptorFunctions¶
This section is empty.
Types¶
typeBucket¶
type Bucket struct {CumulativeCount *uint64 `protobuf:"varint,1,opt,name=cumulative_count,json=cumulativeCount" json:"cumulative_count,omitempty"`// Cumulative in increasing order.CumulativeCountFloat *float64 `protobuf:"fixed64,4,opt,name=cumulative_count_float,json=cumulativeCountFloat" json:"cumulative_count_float,omitempty"`// Overrides cumulative_count if > 0.UpperBound *float64 `protobuf:"fixed64,2,opt,name=upper_bound,json=upperBound" json:"upper_bound,omitempty"`// Inclusive.Exemplar *Exemplar `protobuf:"bytes,3,opt,name=exemplar" json:"exemplar,omitempty"`// contains filtered or unexported fields}A Bucket of a conventional histogram, each of which is treated asan individual counter-like time series by Prometheus.
func (*Bucket)Descriptordeprecated
func (*Bucket)GetCumulativeCount¶
func (*Bucket)GetCumulativeCountFloat¶added inv0.3.0
func (*Bucket)GetExemplar¶added inv0.2.0
func (*Bucket)GetUpperBound¶
func (*Bucket)ProtoMessage¶
func (*Bucket) ProtoMessage()
func (*Bucket)ProtoReflect¶added inv0.4.0
func (x *Bucket) ProtoReflect()protoreflect.Message
typeBucketSpan¶added inv0.3.0
type BucketSpan struct {Offset *int32 `protobuf:"zigzag32,1,opt,name=offset" json:"offset,omitempty"`// Gap to previous span, or starting point for 1st span (which can be negative).Length *uint32 `protobuf:"varint,2,opt,name=length" json:"length,omitempty"`// Length of consecutive buckets.// contains filtered or unexported fields}A BucketSpan defines a number of consecutive buckets in a nativehistogram with their offset. Logically, it would be morestraightforward to include the bucket counts in the Span. However,the protobuf representation is more compact in the way the data isstructured here (with all the buckets in a single array separatefrom the Spans).
func (*BucketSpan)Descriptordeprecatedadded inv0.3.0
func (*BucketSpan) Descriptor() ([]byte, []int)
Deprecated: Use BucketSpan.ProtoReflect.Descriptor instead.
func (*BucketSpan)GetLength¶added inv0.3.0
func (x *BucketSpan) GetLength()uint32
func (*BucketSpan)GetOffset¶added inv0.3.0
func (x *BucketSpan) GetOffset()int32
func (*BucketSpan)ProtoMessage¶added inv0.3.0
func (*BucketSpan) ProtoMessage()
func (*BucketSpan)ProtoReflect¶added inv0.4.0
func (x *BucketSpan) ProtoReflect()protoreflect.Message
func (*BucketSpan)Reset¶added inv0.3.0
func (x *BucketSpan) Reset()
func (*BucketSpan)String¶added inv0.3.0
func (x *BucketSpan) String()string
typeCounter¶
type Counter struct {Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`Exemplar *Exemplar `protobuf:"bytes,2,opt,name=exemplar" json:"exemplar,omitempty"`CreatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_timestamp,json=createdTimestamp" json:"created_timestamp,omitempty"`// contains filtered or unexported fields} func (*Counter)Descriptordeprecated
func (*Counter)GetCreatedTimestamp¶added inv0.5.0
func (x *Counter) GetCreatedTimestamp() *timestamppb.Timestamp
func (*Counter)GetExemplar¶added inv0.2.0
func (*Counter)ProtoMessage¶
func (*Counter) ProtoMessage()
func (*Counter)ProtoReflect¶added inv0.4.0
func (x *Counter) ProtoReflect()protoreflect.Message
typeExemplar¶added inv0.2.0
type Exemplar struct {Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"`Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"`Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp,omitempty"`// OpenMetrics-style.// contains filtered or unexported fields} func (*Exemplar)Descriptordeprecatedadded inv0.2.0
func (*Exemplar)GetTimestamp¶added inv0.2.0
func (x *Exemplar) GetTimestamp() *timestamppb.Timestamp
func (*Exemplar)ProtoMessage¶added inv0.2.0
func (*Exemplar) ProtoMessage()
func (*Exemplar)ProtoReflect¶added inv0.4.0
func (x *Exemplar) ProtoReflect()protoreflect.Message
typeGauge¶
type Gauge struct {Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`// contains filtered or unexported fields} func (*Gauge)Descriptordeprecated
func (*Gauge)ProtoMessage¶
func (*Gauge) ProtoMessage()
func (*Gauge)ProtoReflect¶added inv0.4.0
func (x *Gauge) ProtoReflect()protoreflect.Message
typeHistogram¶
type Histogram struct {SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount" json:"sample_count,omitempty"`SampleCountFloat *float64 `protobuf:"fixed64,4,opt,name=sample_count_float,json=sampleCountFloat" json:"sample_count_float,omitempty"`// Overrides sample_count if > 0.SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum" json:"sample_sum,omitempty"`// Buckets for the conventional histogram.Bucket []*Bucket `protobuf:"bytes,3,rep,name=bucket" json:"bucket,omitempty"`// Ordered in increasing order of upper_bound, +Inf bucket is optional.CreatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created_timestamp,json=createdTimestamp" json:"created_timestamp,omitempty"`// schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.// They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and// then each power of two is divided into 2^n logarithmic buckets.// Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).// In the future, more bucket schemas may be added using numbers < -4 or > 8.Schema *int32 `protobuf:"zigzag32,5,opt,name=schema" json:"schema,omitempty"`ZeroThreshold *float64 `protobuf:"fixed64,6,opt,name=zero_threshold,json=zeroThreshold" json:"zero_threshold,omitempty"`// Breadth of the zero bucket.ZeroCount *uint64 `protobuf:"varint,7,opt,name=zero_count,json=zeroCount" json:"zero_count,omitempty"`// Count in zero bucket.ZeroCountFloat *float64 `protobuf:"fixed64,8,opt,name=zero_count_float,json=zeroCountFloat" json:"zero_count_float,omitempty"`// Overrides sb_zero_count if > 0.// Negative buckets for the native histogram.NegativeSpan []*BucketSpan `protobuf:"bytes,9,rep,name=negative_span,json=negativeSpan" json:"negative_span,omitempty"`// Use either "negative_delta" or "negative_count", the former for// regular histograms with integer counts, the latter for float// histograms.NegativeDelta []int64 `protobuf:"zigzag64,10,rep,name=negative_delta,json=negativeDelta" json:"negative_delta,omitempty"`// Count delta of each bucket compared to previous one (or to zero for 1st bucket).NegativeCount []float64 `protobuf:"fixed64,11,rep,name=negative_count,json=negativeCount" json:"negative_count,omitempty"`// Absolute count of each bucket.// Positive buckets for the native histogram.// Use a no-op span (offset 0, length 0) for a native histogram without any// observations yet and with a zero_threshold of 0. Otherwise, it would be// indistinguishable from a classic histogram.PositiveSpan []*BucketSpan `protobuf:"bytes,12,rep,name=positive_span,json=positiveSpan" json:"positive_span,omitempty"`// Use either "positive_delta" or "positive_count", the former for// regular histograms with integer counts, the latter for float// histograms.PositiveDelta []int64 `protobuf:"zigzag64,13,rep,name=positive_delta,json=positiveDelta" json:"positive_delta,omitempty"`// Count delta of each bucket compared to previous one (or to zero for 1st bucket).PositiveCount []float64 `protobuf:"fixed64,14,rep,name=positive_count,json=positiveCount" json:"positive_count,omitempty"`// Absolute count of each bucket.// Only used for native histograms. These exemplars MUST have a timestamp.Exemplars []*Exemplar `protobuf:"bytes,16,rep,name=exemplars" json:"exemplars,omitempty"`// contains filtered or unexported fields} func (*Histogram)Descriptordeprecated
func (*Histogram)GetCreatedTimestamp¶added inv0.5.0
func (x *Histogram) GetCreatedTimestamp() *timestamppb.Timestamp
func (*Histogram)GetExemplars¶added inv0.6.0
func (*Histogram)GetNegativeCount¶added inv0.3.0
func (*Histogram)GetNegativeDelta¶added inv0.3.0
func (*Histogram)GetNegativeSpan¶added inv0.3.0
func (x *Histogram) GetNegativeSpan() []*BucketSpan
func (*Histogram)GetPositiveCount¶added inv0.3.0
func (*Histogram)GetPositiveDelta¶added inv0.3.0
func (*Histogram)GetPositiveSpan¶added inv0.3.0
func (x *Histogram) GetPositiveSpan() []*BucketSpan
func (*Histogram)GetSampleCount¶
func (*Histogram)GetSampleCountFloat¶added inv0.3.0
func (*Histogram)GetSampleSum¶
func (*Histogram)GetZeroCount¶added inv0.3.0
func (*Histogram)GetZeroCountFloat¶added inv0.3.0
func (*Histogram)GetZeroThreshold¶added inv0.3.0
func (*Histogram)ProtoMessage¶
func (*Histogram) ProtoMessage()
func (*Histogram)ProtoReflect¶added inv0.4.0
func (x *Histogram) ProtoReflect()protoreflect.Message
typeLabelPair¶
type LabelPair struct {Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`// contains filtered or unexported fields} func (*LabelPair)Descriptordeprecated
func (*LabelPair)ProtoMessage¶
func (*LabelPair) ProtoMessage()
func (*LabelPair)ProtoReflect¶added inv0.4.0
func (x *LabelPair) ProtoReflect()protoreflect.Message
typeMetric¶
type Metric struct {Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"`Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge" json:"gauge,omitempty"`Counter *Counter `protobuf:"bytes,3,opt,name=counter" json:"counter,omitempty"`Summary *Summary `protobuf:"bytes,4,opt,name=summary" json:"summary,omitempty"`Untyped *Untyped `protobuf:"bytes,5,opt,name=untyped" json:"untyped,omitempty"`Histogram *Histogram `protobuf:"bytes,7,opt,name=histogram" json:"histogram,omitempty"`TimestampMs *int64 `protobuf:"varint,6,opt,name=timestamp_ms,json=timestampMs" json:"timestamp_ms,omitempty"`// contains filtered or unexported fields} func (*Metric)Descriptordeprecated
func (*Metric)GetCounter¶
func (*Metric)GetHistogram¶
func (*Metric)GetSummary¶
func (*Metric)GetTimestampMs¶
func (*Metric)GetUntyped¶
func (*Metric)ProtoMessage¶
func (*Metric) ProtoMessage()
func (*Metric)ProtoReflect¶added inv0.4.0
func (x *Metric) ProtoReflect()protoreflect.Message
typeMetricFamily¶
type MetricFamily struct {Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`Help *string `protobuf:"bytes,2,opt,name=help" json:"help,omitempty"`Type *MetricType `protobuf:"varint,3,opt,name=type,enum=io.prometheus.client.MetricType" json:"type,omitempty"`Metric []*Metric `protobuf:"bytes,4,rep,name=metric" json:"metric,omitempty"`Unit *string `protobuf:"bytes,5,opt,name=unit" json:"unit,omitempty"`// contains filtered or unexported fields} func (*MetricFamily)Descriptordeprecated
func (*MetricFamily) Descriptor() ([]byte, []int)
Deprecated: Use MetricFamily.ProtoReflect.Descriptor instead.
func (*MetricFamily)GetHelp¶
func (x *MetricFamily) GetHelp()string
func (*MetricFamily)GetMetric¶
func (x *MetricFamily) GetMetric() []*Metric
func (*MetricFamily)GetName¶
func (x *MetricFamily) GetName()string
func (*MetricFamily)GetType¶
func (x *MetricFamily) GetType()MetricType
func (*MetricFamily)GetUnit¶added inv0.6.0
func (x *MetricFamily) GetUnit()string
func (*MetricFamily)ProtoMessage¶
func (*MetricFamily) ProtoMessage()
func (*MetricFamily)ProtoReflect¶added inv0.4.0
func (x *MetricFamily) ProtoReflect()protoreflect.Message
func (*MetricFamily)Reset¶
func (x *MetricFamily) Reset()
func (*MetricFamily)String¶
func (x *MetricFamily) String()string
typeMetricType¶
type MetricTypeint32
const (// COUNTER must use the Metric field "counter".MetricType_COUNTERMetricType = 0// GAUGE must use the Metric field "gauge".MetricType_GAUGEMetricType = 1// SUMMARY must use the Metric field "summary".MetricType_SUMMARYMetricType = 2// UNTYPED must use the Metric field "untyped".MetricType_UNTYPEDMetricType = 3// HISTOGRAM must use the Metric field "histogram".MetricType_HISTOGRAMMetricType = 4// GAUGE_HISTOGRAM must use the Metric field "histogram".MetricType_GAUGE_HISTOGRAMMetricType = 5)
func (MetricType)Descriptor¶added inv0.4.0
func (MetricType) Descriptor()protoreflect.EnumDescriptor
func (MetricType)Enum¶
func (xMetricType) Enum() *MetricType
func (MetricType)EnumDescriptordeprecated
func (MetricType) EnumDescriptor() ([]byte, []int)
Deprecated: Use MetricType.Descriptor instead.
func (MetricType)Number¶added inv0.4.0
func (xMetricType) Number()protoreflect.EnumNumber
func (MetricType)String¶
func (xMetricType) String()string
func (MetricType)Type¶added inv0.4.0
func (MetricType) Type()protoreflect.EnumType
func (*MetricType)UnmarshalJSONdeprecated
func (x *MetricType) UnmarshalJSON(b []byte)error
Deprecated: Do not use.
typeQuantile¶
type Quantile struct {Quantile *float64 `protobuf:"fixed64,1,opt,name=quantile" json:"quantile,omitempty"`Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"`// contains filtered or unexported fields} func (*Quantile)Descriptordeprecated
func (*Quantile)GetQuantile¶
func (*Quantile)ProtoMessage¶
func (*Quantile) ProtoMessage()
func (*Quantile)ProtoReflect¶added inv0.4.0
func (x *Quantile) ProtoReflect()protoreflect.Message
typeSummary¶
type Summary struct {SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount" json:"sample_count,omitempty"`SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum" json:"sample_sum,omitempty"`Quantile []*Quantile `protobuf:"bytes,3,rep,name=quantile" json:"quantile,omitempty"`CreatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_timestamp,json=createdTimestamp" json:"created_timestamp,omitempty"`// contains filtered or unexported fields} func (*Summary)Descriptordeprecated
func (*Summary)GetCreatedTimestamp¶added inv0.5.0
func (x *Summary) GetCreatedTimestamp() *timestamppb.Timestamp
func (*Summary)GetQuantile¶
func (*Summary)GetSampleCount¶
func (*Summary)GetSampleSum¶
func (*Summary)ProtoMessage¶
func (*Summary) ProtoMessage()
func (*Summary)ProtoReflect¶added inv0.4.0
func (x *Summary) ProtoReflect()protoreflect.Message
typeUntyped¶
type Untyped struct {Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`// contains filtered or unexported fields} func (*Untyped)Descriptordeprecated
func (*Untyped)ProtoMessage¶
func (*Untyped) ProtoMessage()
func (*Untyped)ProtoReflect¶added inv0.4.0
func (x *Untyped) ProtoReflect()protoreflect.Message