promadapter

package
v0.0.0-...-d4e82b2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	PrometheusAdapter
}

Adapter Generic Struct for exposing PrometheusAdapter transforming methods of Prometheus 2 AppOptics structs

func (*Adapter) LabelsToTags

func (p *Adapter) LabelsToTags(sample *model.Sample) map[string]string

LabelsToTags converts the Metric's associated Labels to AppOptics Tags

func (*Adapter) PromDataToAppOpticsMeasurements

func (p *Adapter) PromDataToAppOpticsMeasurements(req *promremote.WriteRequest) []appoptics.Measurement

PromDataToAppOpticsMeasurements injests a *promremote.WriteRequest and transforms it to []appoptics.Measurement

func (*Adapter) SamplesToMeasurements

func (p *Adapter) SamplesToMeasurements(samples model.Samples) []appoptics.Measurement

SamplesToMeasurements converts Prometheus common model Samples to a collection of AppOptics Measurements

func (*Adapter) WriteRequestToSamples

func (p *Adapter) WriteRequestToSamples(req *promremote.WriteRequest) model.Samples

WriteRequestToSamples converts a Prometheus remote storage WriteRequest to a collection of Prometheus common model Samples

type PrometheusAdapter

type PrometheusAdapter interface {
	WriteRequestToSamples(req *promremote.WriteRequest) model.Samples
	PromDataToAppOpticsMeasurements(req *promremote.WriteRequest) []appoptics.Measurement
	SamplesToMeasurements(samples model.Samples) []appoptics.Measurement
	LabelsToTags(sample *model.Sample) map[string]string
}

PrometheusAdapter interface for exposing transforming methods of Prometheus 2 AppOptics structs

func NewPromAdapter

func NewPromAdapter() PrometheusAdapter

NewPromAdapter creates a Prometheus Adapter which is able to transform structs from the Prometheus Package to the AppOptics Package types

Jump to

Keyboard shortcuts

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