pmetric

package
v0.58.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 441

Documentation

Index

Constants

View Source
const (
	MetricDataTypeNone                 = internal.MetricDataTypeNone
	MetricDataTypeGauge                = internal.MetricDataTypeGauge
	MetricDataTypeSum                  = internal.MetricDataTypeSum
	MetricDataTypeHistogram            = internal.MetricDataTypeHistogram
	MetricDataTypeExponentialHistogram = internal.MetricDataTypeExponentialHistogram
	MetricDataTypeSummary              = internal.MetricDataTypeSummary
)
View Source
const (
	// MetricAggregationTemporalityUnspecified is the default MetricAggregationTemporality, it MUST NOT be used.
	MetricAggregationTemporalityUnspecified = internal.MetricAggregationTemporalityUnspecified

	// MetricAggregationTemporalityDelta is a MetricAggregationTemporality for a metric aggregator which reports changes since last report time.
	MetricAggregationTemporalityDelta = internal.MetricAggregationTemporalityDelta

	// MetricAggregationTemporalityCumulative is a MetricAggregationTemporality for a metric aggregator which reports changes since a fixed start time.
	MetricAggregationTemporalityCumulative = internal.MetricAggregationTemporalityCumulative
)
View Source
const (
	NumberDataPointValueTypeNone   = internal.NumberDataPointValueTypeNone
	NumberDataPointValueTypeInt    = internal.NumberDataPointValueTypeInt
	NumberDataPointValueTypeDouble = internal.NumberDataPointValueTypeDouble
)
View Source
const (
	ExemplarValueTypeNone   = internal.ExemplarValueTypeNone
	ExemplarValueTypeInt    = internal.ExemplarValueTypeInt
	ExemplarValueTypeDouble = internal.ExemplarValueTypeDouble
)

Variables

View Source
var NewBuckets = internal.NewBuckets

NewBuckets is an alias for a function to create a new empty Buckets.

View Source
var NewExemplar = internal.NewExemplar

NewExemplar is an alias for a function to create a new empty Exemplar.

View Source
var NewExemplarSlice = internal.NewExemplarSlice

NewExemplarSlice creates a ExemplarSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

View Source
var NewExponentialHistogram = internal.NewExponentialHistogram

NewExponentialHistogram is an alias for a function to create a new empty ExponentialHistogram.

View Source
var NewExponentialHistogramDataPoint = internal.NewExponentialHistogramDataPoint

NewExponentialHistogramDataPoint is an alias for a function to create a new empty ExponentialHistogramDataPoint.

View Source
var NewExponentialHistogramDataPointSlice = internal.NewExponentialHistogramDataPointSlice

NewExponentialHistogramDataPointSlice creates a ExponentialHistogramDataPointSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

View Source
var NewGauge = internal.NewGauge

NewGauge is an alias for a function to create a new empty Gauge.

View Source
var NewHistogram = internal.NewHistogram

NewHistogram is an alias for a function to create a new empty Histogram.

View Source
var NewHistogramDataPoint = internal.NewHistogramDataPoint

NewHistogramDataPoint is an alias for a function to create a new empty HistogramDataPoint.

View Source
var NewHistogramDataPointSlice = internal.NewHistogramDataPointSlice

NewHistogramDataPointSlice creates a HistogramDataPointSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

View Source
var NewMetric = internal.NewMetric

NewMetric is an alias for a function to create a new empty Metric.

View Source
var NewMetricDataPointFlags = internal.NewMetricDataPointFlags

NewMetricDataPointFlags returns a new empty MetricDataPointFlags.

View Source
var NewMetricDataPointFlagsStruct = NewMetricDataPointFlags

NewMetricDataPointFlagsStruct returns a new empty MetricDataPointFlagsStruct. Deprecated [0.58.0] Use NewMetricDataPointFlags instead

View Source
var NewMetricSlice = internal.NewMetricSlice

NewMetricSlice creates a MetricSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

View Source
var NewMetrics = internal.NewMetrics

NewMetrics creates a new Metrics struct.

View Source
var NewNumberDataPoint = internal.NewNumberDataPoint

NewNumberDataPoint is an alias for a function to create a new empty NumberDataPoint.

View Source
var NewNumberDataPointSlice = internal.NewNumberDataPointSlice

NewNumberDataPointSlice creates a NumberDataPointSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

View Source
var NewResourceMetrics = internal.NewResourceMetrics

NewResourceMetrics is an alias for a function to create a new empty ResourceMetrics.

View Source
var NewResourceMetricsSlice = internal.NewResourceMetricsSlice

NewResourceMetricsSlice creates a ResourceMetricsSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

View Source
var NewScopeMetrics = internal.NewScopeMetrics

NewScopeMetrics is an alias for a function to create a new empty ScopeMetrics.

View Source
var NewScopeMetricsSlice = internal.NewScopeMetricsSlice

NewScopeMetricsSlice creates a ScopeMetricsSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

View Source
var NewSum = internal.NewSum

NewSum is an alias for a function to create a new empty Sum.

View Source
var NewSummary = internal.NewSummary

NewSummary is an alias for a function to create a new empty Summary.

View Source
var NewSummaryDataPoint = internal.NewSummaryDataPoint

NewSummaryDataPoint is an alias for a function to create a new empty SummaryDataPoint.

View Source
var NewSummaryDataPointSlice = internal.NewSummaryDataPointSlice

NewSummaryDataPointSlice creates a SummaryDataPointSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

View Source
var NewValueAtQuantile = internal.NewValueAtQuantile

NewValueAtQuantile is an alias for a function to create a new empty ValueAtQuantile.

View Source
var NewValueAtQuantileSlice = internal.NewValueAtQuantileSlice

NewValueAtQuantileSlice creates a ValueAtQuantileSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

Functions

This section is empty.

Types

type Buckets

type Buckets = internal.Buckets

Buckets are a set of bucket counts, encoded in a contiguous array of counts.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewBuckets function to create new instances. Important: zero-initialized instance is not valid for use.

type Exemplar

type Exemplar = internal.Exemplar

Exemplar is a sample input double measurement.

Exemplars also hold information about the environment when the measurement was recorded, for example the span and trace ID of the active span when the exemplar was recorded.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewExemplar function to create new instances. Important: zero-initialized instance is not valid for use.

type ExemplarSlice

type ExemplarSlice = internal.ExemplarSlice

ExemplarSlice logically represents a slice of Exemplar.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewExemplarSlice function to create new instances. Important: zero-initialized instance is not valid for use.

type ExemplarValueType added in v0.50.0

type ExemplarValueType = internal.ExemplarValueType

ExemplarValueType specifies the type of Exemplar measurement value.

type ExponentialHistogram

type ExponentialHistogram = internal.ExponentialHistogram

ExponentialHistogram represents the type of a metric that is calculated by aggregating as a ExponentialHistogram of all reported double measurements over a time interval.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewExponentialHistogram function to create new instances. Important: zero-initialized instance is not valid for use.

type ExponentialHistogramDataPoint

type ExponentialHistogramDataPoint = internal.ExponentialHistogramDataPoint

ExponentialHistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains summary statistics for a population of values, it may optionally contain the distribution of those values across a set of buckets.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewExponentialHistogramDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.

type ExponentialHistogramDataPointSlice

type ExponentialHistogramDataPointSlice = internal.ExponentialHistogramDataPointSlice

ExponentialHistogramDataPointSlice logically represents a slice of ExponentialHistogramDataPoint.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewExponentialHistogramDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.

type Gauge

type Gauge = internal.Gauge

Gauge represents the type of a numeric metric that always exports the "current value" for every data point.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewGauge function to create new instances. Important: zero-initialized instance is not valid for use.

type Histogram

type Histogram = internal.Histogram

Histogram represents the type of a metric that is calculated by aggregating as a Histogram of all reported measurements over a time interval.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewHistogram function to create new instances. Important: zero-initialized instance is not valid for use.

type HistogramDataPoint

type HistogramDataPoint = internal.HistogramDataPoint

HistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a Histogram of values.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewHistogramDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.

type HistogramDataPointSlice

type HistogramDataPointSlice = internal.HistogramDataPointSlice

HistogramDataPointSlice logically represents a slice of HistogramDataPoint.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewHistogramDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.

type Marshaler

type Marshaler interface {
	// MarshalMetrics the given pmetric.Metrics into bytes.
	// If the error is not nil, the returned bytes slice cannot be used.
	MarshalMetrics(md Metrics) ([]byte, error)
}

Marshaler marshals pmetric.Metrics into bytes.

func NewJSONMarshaler

func NewJSONMarshaler() Marshaler

NewJSONMarshaler returns a model.Marshaler. Marshals to OTLP json bytes.

func NewProtoMarshaler

func NewProtoMarshaler() Marshaler

NewProtoMarshaler returns a Marshaler. Marshals to OTLP binary protobuf bytes.

type Metric

type Metric = internal.Metric

Metric represents one metric as a collection of datapoints. See Metric definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewMetric function to create new instances. Important: zero-initialized instance is not valid for use.

type MetricAggregationTemporality

type MetricAggregationTemporality = internal.MetricAggregationTemporality

MetricAggregationTemporality defines how a metric aggregator reports aggregated values. It describes how those values relate to the time interval over which they are aggregated.

type MetricDataPointFlags

type MetricDataPointFlags = internal.MetricDataPointFlags

MetricDataPointFlags defines how a metric aggregator reports aggregated values. It describes how those values relate to the time interval over which they are aggregated.

type MetricDataPointFlagsStruct added in v0.57.1

type MetricDataPointFlagsStruct = MetricDataPointFlags

MetricDataPointFlagsStruct defines how a metric aggregator reports aggregated values. It describes how those values relate to the time interval over which they are aggregated. Deprecated [0.58.0] Use MetricDataPointFlags instead

type MetricDataType

type MetricDataType = internal.MetricDataType

MetricDataType specifies the type of data in a Metric.

type MetricSlice

type MetricSlice = internal.MetricSlice

MetricSlice logically represents a slice of Metric.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewMetricSlice function to create new instances. Important: zero-initialized instance is not valid for use.

type Metrics

type Metrics = internal.Metrics

Metrics is the top-level struct that is propagated through the metrics pipeline. Use NewMetrics to create new instance, zero-initialized instance is not valid for use.

type NumberDataPoint

type NumberDataPoint = internal.NumberDataPoint

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

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewNumberDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.

type NumberDataPointSlice

type NumberDataPointSlice = internal.NumberDataPointSlice

NumberDataPointSlice logically represents a slice of NumberDataPoint.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewNumberDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.

type NumberDataPointValueType added in v0.50.0

type NumberDataPointValueType = internal.NumberDataPointValueType

NumberDataPointValueType specifies the type of NumberDataPoint value.

type ResourceMetrics

type ResourceMetrics = internal.ResourceMetrics

ResourceMetrics is a collection of metrics from a Resource.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewResourceMetrics function to create new instances. Important: zero-initialized instance is not valid for use.

type ResourceMetricsSlice

type ResourceMetricsSlice = internal.ResourceMetricsSlice

ResourceMetricsSlice logically represents a slice of ResourceMetrics.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewResourceMetricsSlice function to create new instances. Important: zero-initialized instance is not valid for use.

type ScopeMetrics

type ScopeMetrics = internal.ScopeMetrics

ScopeMetrics is a collection of metrics from a LibraryInstrumentation.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewScopeMetrics function to create new instances. Important: zero-initialized instance is not valid for use.

type ScopeMetricsSlice

type ScopeMetricsSlice = internal.ScopeMetricsSlice

ScopeMetricsSlice logically represents a slice of ScopeMetrics.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewScopeMetricsSlice function to create new instances. Important: zero-initialized instance is not valid for use.

type Sizer

type Sizer interface {
	// MetricsSize returns the size in bytes of a marshaled Metrics.
	MetricsSize(md Metrics) int
}

Sizer is an optional interface implemented by the Marshaler, that calculates the size of a marshaled Metrics.

type Sum

type Sum = internal.Sum

Sum represents the type of a numeric metric that is calculated as a sum of all reported measurements over a time interval.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSum function to create new instances. Important: zero-initialized instance is not valid for use.

type Summary

type Summary = internal.Summary

Summary represents the type of a metric that is calculated by aggregating as a Summary of all reported double measurements over a time interval.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSummary function to create new instances. Important: zero-initialized instance is not valid for use.

type SummaryDataPoint

type SummaryDataPoint = internal.SummaryDataPoint

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

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSummaryDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.

type SummaryDataPointSlice

type SummaryDataPointSlice = internal.SummaryDataPointSlice

SummaryDataPointSlice logically represents a slice of SummaryDataPoint.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewSummaryDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.

type Unmarshaler

type Unmarshaler interface {
	// UnmarshalMetrics the given bytes into pmetric.Metrics.
	// If the error is not nil, the returned pmetric.Metrics cannot be used.
	UnmarshalMetrics(buf []byte) (Metrics, error)
}

Unmarshaler unmarshalls bytes into pmetric.Metrics.

func NewJSONUnmarshaler

func NewJSONUnmarshaler() Unmarshaler

NewJSONUnmarshaler returns a model.Unmarshaler. Unmarshals from OTLP json bytes.

func NewProtoUnmarshaler

func NewProtoUnmarshaler() Unmarshaler

NewProtoUnmarshaler returns a model.Unmarshaler. Unmarshals from OTLP binary protobuf bytes.

type ValueAtQuantile

type ValueAtQuantile = internal.ValueAtQuantile

ValueAtQuantile is a quantile value within a Summary data point.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewValueAtQuantile function to create new instances. Important: zero-initialized instance is not valid for use.

type ValueAtQuantileSlice

type ValueAtQuantileSlice = internal.ValueAtQuantileSlice

ValueAtQuantileSlice logically represents a slice of ValueAtQuantile.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewValueAtQuantileSlice function to create new instances. Important: zero-initialized instance is not valid for use.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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