otlp

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromMetric

func FromMetric(m *metricsv1.Metric) []*datapoint.Datapoint

FromMetric converts a OTLP Metric to SignalFx datapoint(s).

func FromOTLPMetricRequest

FromOTLPMetricRequest converts the ResourceMetrics in an incoming request to SignalFx datapoints

func FromOTLPResourceMetrics

func FromOTLPResourceMetrics(rms []*metricsv1.ResourceMetrics) []*datapoint.Datapoint

FromOTLPResourceMetrics converts OTLP ResourceMetrics to SignalFx datapoints.

func NewHTTPMetricDecoder

func NewHTTPMetricDecoder(sink dpsink.Sink, logger log.Logger) signalfx.ErrorReader

NewHTTPMetricDecoder decodes OTLP metrics and puts them onto the provided sink.

func StringAttributesToDimensions added in v0.1.10

func StringAttributesToDimensions(attributes []*commonv1.KeyValue) map[string]string

StringAttributesToDimensions converts a list of string KVs into a map.

func StringifyAnyValue added in v0.1.10

func StringifyAnyValue(a *commonv1.AnyValue) string

StringifyAnyValue converts an AnyValue to a string. KVLists and Arrays get recursively JSON marshalled.

Types

type SignalFxMetric added in v0.1.10

type SignalFxMetric struct {
	Name string
	Type datapoint.MetricType
	DP   metricsv1.NumberDataPoint
}

SignalFxMetric is a single NumberDataPoint paired with a metric name such that it contains all of the information needed to convert it to a SignalFx datapoint. It serves as an intermediate object between an OTLP DataPoint and the SignalFx datapoint.Datapoint type. Atttribute values must be made into strings and attributes from the resource should be added to the attributes of the DP.

func SignalFxMetricsFromOTLPMetric added in v0.1.10

func SignalFxMetricsFromOTLPMetric(m *metricsv1.Metric) []SignalFxMetric

SignalFxMetricsFromOTLPMetric converts an OTLP Metric to a SignalFxMetric

func SignalFxMetricsFromOTLPResourceMetrics added in v0.1.10

func SignalFxMetricsFromOTLPResourceMetrics(rms []*metricsv1.ResourceMetrics) []SignalFxMetric

SignalFxMetricsFromOTLPResourceMetrics creates the intermediate SignalFxMetric from OTLP metrics instead of going all the way to datapoint.Datapoint.

func (*SignalFxMetric) ToDatapoint added in v0.1.10

func (s *SignalFxMetric) ToDatapoint() *datapoint.Datapoint

ToDatapoint converts the SignalFxMetric to a datapoint.Datapoint instance

Jump to

Keyboard shortcuts

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