metrics

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware added in v0.1.3

func Middleware() func(handler http.Handler) http.Handler

Middleware collects prometheus metrics from HTTP server requests.

See https://opentelemetry.io/docs/reference/specification/metrics/semantic_conventions/http-metrics/ for exported metrics.

func MustNewDefault added in v0.1.6

func MustNewDefault(ctx context.Context) *prometheus.Exporter

MustNewDefault calls NewDefault and panics if there was an error.

func New

func New(ctx context.Context, isGlobal bool) (*prometheus.Exporter, error)

New creates and configures an OpenTelemetry prometheus exporter. Providing a prometheus.Config is optional

func NewDefault added in v0.1.6

func NewDefault(ctx context.Context) (*prometheus.Exporter, error)

NewDefault creates and configures OpenTelemetry for exporting Prometheus metrics. It uses the default Prometheus configuration and sets it as the global provider.

Types

This section is empty.

Jump to

Keyboard shortcuts

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