metrics

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package metrics provides command line flags for configuring the metrics backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flags *flag.FlagSet)

AddFlags adds flags for Builder.

Types

type Builder

type Builder struct {
	Backend   string
	HTTPRoute string // endpoint name to expose metrics, e.g. for scraping
	// contains filtered or unexported fields
}

Builder provides command line options to configure metrics backend used by Jaeger executables.

func (*Builder) CreateMetricsFactory

func (b *Builder) CreateMetricsFactory(namespace string) (metrics.Factory, error)

CreateMetricsFactory creates a metrics factory based on the configured type of the backend. If the metrics backend supports HTTP endpoint for scraping, it is stored in the builder and can be later added by RegisterHandler function.

func (*Builder) Handler

func (b *Builder) Handler() http.Handler

Handler returns an http.Handler for the metrics endpoint.

func (*Builder) InitFromViper

func (b *Builder) InitFromViper(v *viper.Viper) *Builder

InitFromViper initializes Builder with properties retrieved from Viper.

Jump to

Keyboard shortcuts

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