prometheus

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

README

prometheus-go-metrics-exporter

OpenCensus Prometheus Go Metrics exporter

Documentation

Overview

Example
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

Exporter is the type that converts OpenCensus Proto-Metrics into Prometheus metrics.

func New

func New(o Options) (*Exporter, error)

New is the constructor to make an Exporter with the defined Options.

func (*Exporter) ExportMetric

func (exp *Exporter) ExportMetric(ctx context.Context, node *commonpb.Node, rsc *resourcepb.Resource, metric *metricspb.Metric) error

ExportMetric is the method that the exporter uses to convert OpenCensus Proto-Metrics to Prometheus metrics.

func (*Exporter) ServeHTTP

func (exp *Exporter) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Options

type Options struct {
	Namespace   string
	OnError     func(err error)
	ConstLabels prometheus.Labels // ConstLabels will be set as labels on all views.
	Registry    *prometheus.Registry
}

Options customizes a created Prometheus Exporter.

Jump to

Keyboard shortcuts

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