Skip to content

Commit

Permalink
docs: update InstallNewPipeline example comment
Browse files Browse the repository at this point in the history
  • Loading branch information
slagiewka committed Apr 12, 2021
1 parent c5d006c commit 72d91d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exporters/metric/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ func NewExportPipeline(config Config, options ...controller.Option) (*Exporter,
// InstallNewPipeline instantiates a NewExportPipeline and registers it globally.
// Typically called as:
//
// hf, err := prometheus.InstallNewPipeline(prometheus.Config{...})
// exporter, err := prometheus.InstallNewPipeline(prometheus.Config{...})
//
// if err != nil {
// ...
// }
// http.HandleFunc("/metrics", hf)
// defer pipeline.Stop()
// http.HandleFunc("/metrics", exporter)
// defer exporter.Controller().Stop(context.TODO())
// ... Done
func InstallNewPipeline(config Config, options ...controller.Option) (*Exporter, error) {
exp, err := NewExportPipeline(config, options...)
Expand Down

0 comments on commit 72d91d2

Please sign in to comment.