Documentation ¶
Index ¶
- func FromMetric(m *metricsv1.Metric) []*datapoint.Datapoint
- func FromOTLPMetricRequest(md *metricsservicev1.ExportMetricsServiceRequest) []*datapoint.Datapoint
- func FromOTLPResourceMetrics(rms []*metricsv1.ResourceMetrics) []*datapoint.Datapoint
- func NewHTTPMetricDecoder(sink dpsink.Sink, logger log.Logger) signalfx.ErrorReader
- func StringAttributesToDimensions(attributes []*commonv1.KeyValue) map[string]string
- func StringifyAnyValue(a *commonv1.AnyValue) string
- type SignalFxMetric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromMetric ¶
FromMetric converts a OTLP Metric to SignalFx datapoint(s).
func FromOTLPMetricRequest ¶
func FromOTLPMetricRequest(md *metricsservicev1.ExportMetricsServiceRequest) []*datapoint.Datapoint
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 ¶
NewHTTPMetricDecoder decodes OTLP metrics and puts them onto the provided sink.
func StringAttributesToDimensions ¶ added in v0.1.10
StringAttributesToDimensions converts a list of string KVs into a map.
func StringifyAnyValue ¶ added in v0.1.10
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