provider

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsProviderOptions

type MetricsProviderOptions struct {
	ServiceName string            `yaml:"serviceName,omitempty"`
	Prometheus  PrometheusOptions `yaml:"prometheus,omitempty"`
}

MetricsProviderOptions represents the options of the providers for publishing metrics.

type PrometheusExporter

type PrometheusExporter struct {
	// MeterProvider is used in the creation and coordination of Meters
	MeterProvider *sdkmetric.MeterProvider

	// Handler is the HTTP handler with basic metrics
	Handler http.Handler
}

PrometheusExporter is the struct that holds the metrics reklated data

func NewPrometheusExporter

func NewPrometheusExporter(options *MetricsProviderOptions) (*PrometheusExporter, error)

NewPrometheusExporter creates a PrometheusExporter instance with a MeterProvider and a Handler, and returns it along with any errors.

type PrometheusOptions

type PrometheusOptions struct {
	Enabled bool   `yaml:"enabled"`
	Path    string `yaml:"path"`
	Port    int    `yaml:"port"`
}

PrometheusOptions represents prometheus metrics provider options.

Jump to

Keyboard shortcuts

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