Documentation ¶
Index ¶
- type Adapter
- func (p *Adapter) LabelsToTags(sample *model.Sample) map[string]string
- func (p *Adapter) PromDataToAppOpticsMeasurements(req *promremote.WriteRequest) []appoptics.Measurement
- func (p *Adapter) SamplesToMeasurements(samples model.Samples) []appoptics.Measurement
- func (p *Adapter) WriteRequestToSamples(req *promremote.WriteRequest) model.Samples
- type PrometheusAdapter
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 ¶
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 ¶
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