package v1
Import Path
github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1 (on go.dev)
Dependency Relation
imports 8 packages, and imported by one package
Involved Source Files
metrics.pb.go
Package-Level Type Names (total 22, in which 20 are exported)
Distribution contains summary statistics for a population of values. It
optionally contains a histogram representing the distribution of those
values across a set of buckets.
Don't change bucket boundaries within a TimeSeries if your backend doesn't
support this.
TODO(issue #152): consider not required to send bucket options for
optimization.
If the distribution does not have a histogram, then omit this field.
If there is a histogram, then the sum of the values in the Bucket counts
must equal the value in the count field of the distribution.
The number of values in the population. Must be non-negative. This value
must equal the sum of the values in bucket_counts if a histogram is
provided.
The sum of the values in the population. If count is zero then this field
must be zero.
The sum of squared deviations from the mean of the values in the
population. For values x_i this is:
Sum[i=1..n]((x_i - mean)^2)
Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
describes Welford's method for accumulating this sum in one pass.
If count is zero then this field must be zero.
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use DistributionValue.ProtoReflect.Descriptor instead.
(*T) GetBucketOptions() *DistributionValue_BucketOptions
(*T) GetBuckets() []*DistributionValue_Bucket
(*T) GetCount() int64
(*T) GetSum() float64
(*T) GetSumOfSquaredDeviation() float64
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*Point).GetDistributionValue() *DistributionValue
The number of values in each bucket of the histogram, as described in
bucket_bounds.
If the distribution does not have a histogram, then omit this field.
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use DistributionValue_Bucket.ProtoReflect.Descriptor instead.
(*T) GetCount() int64
(*T) GetExemplar() *DistributionValue_Exemplar
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*DistributionValue).GetBuckets() []*DistributionValue_Bucket
func contrib.go.opencensus.io/exporter/stackdriver.bucketCounts(buckets []*DistributionValue_Bucket) []int64
A Distribution may optionally contain a histogram of the values in the
population. The bucket boundaries for that histogram are described by
BucketOptions.
If bucket_options has no type, then there is no histogram associated with
the Distribution.
Types that are assignable to Type:
*DistributionValue_BucketOptions_Explicit_
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use DistributionValue_BucketOptions.ProtoReflect.Descriptor instead.
(*T) GetExplicit() *DistributionValue_BucketOptions_Explicit
(*T) GetType() isDistributionValue_BucketOptions_Type
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*DistributionValue).GetBucketOptions() *DistributionValue_BucketOptions
Specifies a set of buckets with arbitrary upper-bounds.
This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket
index i are:
[0, bucket_bounds[i]) for i == 0
[bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-1
[bucket_bounds[i], +infinity) for i == N-1
The values must be strictly increasing and > 0.
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use DistributionValue_BucketOptions_Explicit.ProtoReflect.Descriptor instead.
(*T) GetBounds() []float64
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*DistributionValue_BucketOptions).GetExplicit() *DistributionValue_BucketOptions_Explicit
Bucket with explicit bounds.
(*T) isDistributionValue_BucketOptions_Type()
*T : isDistributionValue_BucketOptions_Type
Exemplars are example points that may be used to annotate aggregated
Distribution values. They are metadata that gives information about a
particular value added to a Distribution bucket.
Contextual information about the example value.
The observation (sampling) time of the above value.
Value of the exemplar point. It determines which bucket the exemplar
belongs to.
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use DistributionValue_Exemplar.ProtoReflect.Descriptor instead.
(*T) GetAttachments() map[string]string
(*T) GetTimestamp() *timestamp.Timestamp
(*T) GetValue() float64
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*DistributionValue_Bucket).GetExemplar() *DistributionValue_Exemplar
Defines a label key associated with a metric descriptor.
A human-readable description of what this label key represents.
The key for the label.
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use LabelKey.ProtoReflect.Descriptor instead.
(*T) GetDescription() string
(*T) GetKey() string
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*MetricDescriptor).GetLabelKeys() []*LabelKey
func contrib.go.opencensus.io/exporter/stackdriver.labelDescriptorsFromProto(defaults map[string]stackdriver.labelValue, protoLabelKeys []*LabelKey) []*labelpb.LabelDescriptor
var contrib.go.opencensus.io/exporter/stackdriver.percentileLabelKey *LabelKey
If false the value field is ignored and considered not set.
This is used to differentiate a missing label from an empty string.
The value for the label.
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use LabelValue.ProtoReflect.Descriptor instead.
(*T) GetHasValue() bool
(*T) GetValue() string
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*TimeSeries).GetLabelValues() []*LabelValue
func contrib.go.opencensus.io/exporter/stackdriver.labelsPerTimeSeries(defaults map[string]stackdriver.labelValue, labelKeys []string, labelValues []*LabelValue) (map[string]string, error)
Defines a Metric which has one or more timeseries.
The descriptor of the Metric.
TODO(issue #152): consider only sending the name of descriptor for
optimization.
The resource for the metric. If unset, it may be set to a default value
provided for a sequence of messages in an RPC stream.
One or more timeseries for a single metric, where each timeseries has
one or more points.
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use Metric.ProtoReflect.Descriptor instead.
(*T) GetMetricDescriptor() *MetricDescriptor
(*T) GetResource() *v1.Resource
(*T) GetTimeseries() []*TimeSeries
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func contrib.go.opencensus.io/exporter/stackdriver.(*Exporter).ExportMetricsProto(ctx context.Context, node *commonpb.Node, rsc *resourcepb.Resource, metrics []*Metric) error
func contrib.go.opencensus.io/exporter/stackdriver.(*Exporter).PushMetricsProto(ctx context.Context, node *commonpb.Node, rsc *resourcepb.Resource, metrics []*Metric) (int, error)
func contrib.go.opencensus.io/exporter/stackdriver.protoMetricDescriptorTypeToMetricKind(m *Metric) (googlemetricpb.MetricDescriptor_MetricKind, googlemetricpb.MetricDescriptor_ValueType)
Defines a metric type and its schema.
A detailed description of the metric, which can be used in documentation.
The label keys associated with the metric descriptor.
The metric type, including its DNS name prefix. It must be unique.
Type MetricDescriptor_Type
The unit in which the metric value is reported. Follows the format
described by http://unitsofmeasure.org/ucum.html.
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use MetricDescriptor.ProtoReflect.Descriptor instead.
(*T) GetDescription() string
(*T) GetLabelKeys() []*LabelKey
(*T) GetName() string
(*T) GetType() MetricDescriptor_Type
(*T) GetUnit() string
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*Metric).GetMetricDescriptor() *MetricDescriptor
The kind of metric. It describes how the data is reported.
A gauge is an instantaneous measurement of a value.
A cumulative measurement is a value accumulated over a time interval. In
a time series, cumulative measurements should have the same start time,
increasing values and increasing end times, until an event resets the
cumulative value to zero and sets a new start time for the following
points.
( T) Descriptor() protoreflect.EnumDescriptor
( T) Enum() *MetricDescriptor_Type
Deprecated: Use MetricDescriptor_Type.Descriptor instead.
( T) Number() protoreflect.EnumNumber
( T) String() string
( T) Type() protoreflect.EnumType
T : expvar.Var
T : fmt.Stringer
T : google.golang.org/protobuf/reflect/protoreflect.Enum
T : context.stringer
T : google.golang.org/protobuf/internal/impl.enumV1
T : runtime.stringer
func (*MetricDescriptor).GetType() MetricDescriptor_Type
func MetricDescriptor_Type.Enum() *MetricDescriptor_Type
const MetricDescriptor_CUMULATIVE_DISTRIBUTION
const MetricDescriptor_CUMULATIVE_DOUBLE
const MetricDescriptor_CUMULATIVE_INT64
const MetricDescriptor_GAUGE_DISTRIBUTION
const MetricDescriptor_GAUGE_DOUBLE
const MetricDescriptor_GAUGE_INT64
const MetricDescriptor_SUMMARY
const MetricDescriptor_UNSPECIFIED
A timestamped measurement.
The moment when this point was recorded. Inclusive.
If not specified, the timestamp will be decided by the backend.
The actual point value.
Types that are assignable to Value:
*Point_Int64Value
*Point_DoubleValue
*Point_DistributionValue
*Point_SummaryValue
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use Point.ProtoReflect.Descriptor instead.
(*T) GetDistributionValue() *DistributionValue
(*T) GetDoubleValue() float64
(*T) GetInt64Value() int64
(*T) GetSummaryValue() *SummaryValue
(*T) GetTimestamp() *timestamp.Timestamp
(*T) GetValue() isPoint_Value
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*TimeSeries).GetPoints() []*Point
func contrib.go.opencensus.io/exporter/stackdriver.fromProtoPoint(startTime *timestamppb.Timestamp, pt *Point) (*monitoringpb.Point, error)
A distribution value.
(*T) isPoint_Value()
*T : isPoint_Value
A 64-bit double-precision floating-point number.
(*T) isPoint_Value()
*T : isPoint_Value
A 64-bit integer.
(*T) isPoint_Value()
*T : isPoint_Value
A summary value. This is not recommended, since it cannot be aggregated.
(*T) isPoint_Value()
*T : isPoint_Value
The start_timestamp only applies to the count and sum in the SummaryValue.
The total number of recorded values since start_time. Optional since
some systems don't expose this.
Values calculated over an arbitrary time window.
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.
This field must be unset if the sum is not available.
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use SummaryValue.ProtoReflect.Descriptor instead.
(*T) GetCount() *wrappers.Int64Value
(*T) GetSnapshot() *SummaryValue_Snapshot
(*T) GetSum() *wrappers.DoubleValue
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*Point).GetSummaryValue() *SummaryValue
The values in this message can be reset at arbitrary unknown times, with
the requirement that all of them are reset at the same time.
The number of values in the snapshot. Optional since some systems don't
expose this.
A list of values at different percentiles of the distribution calculated
from the current snapshot. The percentiles must be strictly increasing.
The sum of values in the snapshot. Optional since some systems don't
expose this. If count is zero then this field must be zero or not set
(if not supported).
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use SummaryValue_Snapshot.ProtoReflect.Descriptor instead.
(*T) GetCount() *wrappers.Int64Value
(*T) GetPercentileValues() []*SummaryValue_Snapshot_ValueAtPercentile
(*T) GetSum() *wrappers.DoubleValue
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*SummaryValue).GetSnapshot() *SummaryValue_Snapshot
Represents the value at a given percentile of a distribution.
The percentile of a distribution. Must be in the interval
(0.0, 100.0].
The value at the given percentile of a distribution.
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use SummaryValue_Snapshot_ValueAtPercentile.ProtoReflect.Descriptor instead.
(*T) GetPercentile() float64
(*T) GetValue() float64
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*SummaryValue_Snapshot).GetPercentileValues() []*SummaryValue_Snapshot_ValueAtPercentile
A collection of data points that describes the time-varying values
of a metric.
The set of label values that uniquely identify this timeseries. Applies to
all points. The order of label values must match that of label keys in the
metric descriptor.
The data points of this timeseries. Point.value type MUST match the
MetricDescriptor.type.
Must be present for cumulative metrics. The time when the cumulative value
was reset to zero. Exclusive. The cumulative value is over the time interval
(start_timestamp, timestamp]. If not specified, the backend can use the
previous recorded value.
sizeCache protoimpl.SizeCache
state protoimpl.MessageState
unknownFields protoimpl.UnknownFields
Deprecated: Use TimeSeries.ProtoReflect.Descriptor instead.
(*T) GetLabelValues() []*LabelValue
(*T) GetPoints() []*Point
(*T) GetStartTimestamp() *timestamp.Timestamp
(*T) ProtoMessage()
(*T) ProtoReflect() protoreflect.Message
(*T) Reset()
(*T) String() string
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : context.stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : runtime.stringer
func (*Metric).GetTimeseries() []*TimeSeries
Package-Level Functions (total 3, none are exported)
Package-Level Variables (total 10, in which 3 are exported)
Enum value maps for MetricDescriptor_Type.
Enum value maps for MetricDescriptor_Type.
Package-Level Constants (total 8, all are exported)
Distribution cumulative measurement. The count and sum cannot decrease,
if resets then the start_time should also be reset.
Floating point cumulative measurement. The value cannot decrease, if
resets then the start_time should also be reset. Recorded values are
always >= 0.
Integer cumulative measurement. The value cannot decrease, if resets
then the start_time should also be reset.
Distribution gauge measurement. The count and sum can go both up and
down. Recorded values are always >= 0.
Used in scenarios like a snapshot of time the current items in a queue
have spent there.
Floating point gauge. The value can go both up and down.
Integer gauge. The value can go both up and down.
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. This is not recommended, since it cannot be aggregated.
Do not use this default value.
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |