prometheus

package
v1.9.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithAddress

func WithAddress(address string) Parameter

WithAddress sets the address.

func WithChainTime added in v1.3.0

func WithChainTime(chainTime chaintime.Service) Parameter

WithChainTime sets the chaintime service.

func WithCreateServer added in v1.8.0

func WithCreateServer(createServer bool) Parameter

WithCreateServer creates a web server for metrics if true.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is a metrics service exposing metrics via prometheus.

func New

func New(_ context.Context, params ...Parameter) (*Service, error)

New creates a new prometheus metrics service.

func (*Service) ClientOperation

func (s *Service) ClientOperation(provider string, operation string, succeeded bool, duration time.Duration)

ClientOperation registers an operation.

func (*Service) Presenter added in v1.2.0

func (*Service) Presenter() string

Presenter returns the presenter for the events.

func (*Service) StrategyOperation added in v1.2.0

func (s *Service) StrategyOperation(strategy string, provider string, operation string, duration time.Duration)

StrategyOperation provides a generic monitor for strategy operations.

Jump to

Keyboard shortcuts

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