Back to

Package data

Latest Go to latest
Published: today | License: Apache-2.0 | Module:


Package Files

func MetricDataToOtlp

func MetricDataToOtlp(md MetricData) []*otlpmetrics.ResourceMetrics

MetricDataToOtlp converts the internal MetricData to the OTLP.

func NewBoolValue

func NewBoolValue(b bool) *commonproto.AnyValue

func NewDoubleValue

func NewDoubleValue(d float64) *commonproto.AnyValue

func NewIntValue

func NewIntValue(i int64) *commonproto.AnyValue

func NewStringValue

func NewStringValue(s string) *commonproto.AnyValue

type MetricData

type MetricData struct {
	// contains filtered or unexported fields

MetricData is the top-level struct that is propagated through the metrics pipeline. This is the newer version of consumerdata.MetricsData, but uses more efficient in-memory representation.

This is a reference type (like builtin map).

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

func MetricDataFromOtlp

func MetricDataFromOtlp(orig []*otlpmetrics.ResourceMetrics) MetricData

MetricDataFromOtlp creates the internal MetricData representation from the OTLP.

func NewMetricData

func NewMetricData() MetricData

NewMetricData creates a new MetricData.

func (MetricData) Clone

func (md MetricData) Clone() MetricData

Clone returns a copy of MetricData.

func (MetricData) MetricAndDataPointCount

func (md MetricData) MetricAndDataPointCount() (metricCount int, dataPointCount int)

MetricAndDataPointCount calculates the total number of metrics and data points.

func (MetricData) MetricCount

func (md MetricData) MetricCount() int

MetricCount calculates the total number of metrics.

func (MetricData) ResourceMetrics

func (md MetricData) ResourceMetrics() pdata.ResourceMetricsSlice

func (MetricData) Size

func (md MetricData) Size() int

Size returns size in bytes.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier