Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallNewPipeline ¶ added in v0.2.1
func InstallNewPipeline(config Config) (*push.Controller, http.HandlerFunc, error)
InstallNewPipeline instantiates a NewExportPipeline and registers it globally. Typically called as: pipeline, hf, err := prometheus.InstallNewPipeline(prometheus.Config{...})
if err != nil { ... }
http.HandleFunc("/metrics", hf) defer pipeline.Stop() ... Done
func NewExportPipeline ¶ added in v0.2.1
func NewExportPipeline(config Config) (*push.Controller, http.HandlerFunc, error)
NewExportPipeline sets up a complete export pipeline with the recommended setup, chaining a NewRawExporter into the recommended selectors and batchers.
Types ¶
type Config ¶ added in v0.2.1
type Config struct { // Registry is the prometheus registry that will be used as the default Registerer and // Gatherer if these are not specified. // // If not set a new empty Registry is created. Registry *prometheus.Registry // Registerer is the prometheus registerer to register // metrics with. // // If not specified the Registry will be used as default. Registerer prometheus.Registerer // Gatherer is the prometheus gatherer to gather // metrics with. // // If not specified the Registry will be used as default. Gatherer prometheus.Gatherer // DefaultSummaryQuantiles is the default summary quantiles // to use. Use nil to specify the system-default summary quantiles. DefaultSummaryQuantiles []float64 // OnError is a function that handle errors that may occur while exporting metrics. // TODO: This should be refactored or even removed once we have a better error handling mechanism. OnError func(error) }
Config is a set of configs for the tally reporter.
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter is an implementation of metric.Exporter that sends metrics to Prometheus.
func NewRawExporter ¶ added in v0.2.1
NewRawExporter returns a new prometheus exporter for prometheus metrics for use in a pipeline.
Click to show internal directories.
Click to hide internal directories.