Documentation
¶
Overview ¶
Package prometheus implements a translator to convert prometheus metrics to OTLP metrics. The translation is expected to work with the envoy metricsserver which emits all metrics as prometheus protobufs. Counters should be cumulative and only gauges, counters and histograms are translated.
Histograms that are emitted by the envoy metrics server are delta histograms instead of cumulative
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is an OTLP metric builder.
func NewBuilder ¶
NewBuilder creates a new OTLP metric builder to convert prometheus metrics to OTLP metrics.
func (*Builder) AddCounter ¶
func (b *Builder) AddCounter(family *prompb.MetricFamily)
AddCounter converts a prometheus counter to an OTLP monotonic Sum and adds it to the metrics builder.
func (*Builder) AddGauge ¶
func (b *Builder) AddGauge(family *prompb.MetricFamily)
AddGauge converts a prometheus gauge to an OTLP Gauge and adds it to the metrics builder.
func (*Builder) AddHistogram ¶
func (b *Builder) AddHistogram(family *prompb.MetricFamily)
AddHistogram converts a prometheus histogram to an OTLP histogram.