monitoring

package
v0.0.0-...-1427ac7 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 15 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

Index

Constants

View Source
const (
	Endpoint = "/metrics"

	EchoShutdownTimeout = 5 * time.Second
)

Variables

View Source
var (
	ErrServerNotSpecified   = fmt.Errorf("web server is not specified")
	ErrServerAlreadyStarted = fmt.Errorf("server already started")
)
View Source
var (
	ErrServerIsNotSet = fmt.Errorf("traking object is not set")
)

Functions

func LoggerValid

func LoggerValid(logger *zap.Logger) bool

func NewLogger

func NewLogger(lc fx.Lifecycle, debug config.DebugConfig) *zap.Logger

Types

type MetricTracker

type MetricTracker interface {
	SetUp() error
}

func NewGRPCTracker

func NewGRPCTracker(server *grpc.Server) MetricTracker

type Monitor

type Monitor interface {
	TrackMetrics(metrics ...MetricTracker) Monitor
	StartDetached(logger *zap.Logger)
	Start() error
	GracefulStop() error
	Error() error
}

func New

type SchedulerMetrics

type SchedulerMetrics interface {
	AddScheduled(taskType string) SchedulerMetrics
	AddExecuted(taskType string) SchedulerMetrics
	UpdateExecutionTime(taskType string, duration time.Duration) SchedulerMetrics
	AddTaskSuccess(taskType string) SchedulerMetrics
	AddTaskFailed(taskType string) SchedulerMetrics
}

func NewSchedulerMetrics

func NewSchedulerMetrics() SchedulerMetrics

Directories

Path Synopsis
Package monitoring_mocks is a generated GoMock package.
Package monitoring_mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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