monitoring

package
v0.0.0-...-426d1e8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Logging Formats
	TaskLogger = "task=%s message=%s"
)

Functions

func GenerateTxId

func GenerateTxId(meta v12.Object, ctrlName string, id string) string

func InitializeMonitoring

func InitializeMonitoring() error

func NewLogger

func NewLogger(logFields map[string]interface{})

func NewMeter

func NewMeter(meterName string) api.Meter

NewMeter creates a new meter which defines the metric scope

func NewTaskFormatter

func NewTaskFormatter(formats ...string) string

Types

type Metric

type Metric interface {
	Increment(attributes api.MeasurementOption)
	Name() string
}

Metric interface for abstracting the different operations for the various metric types provided by open telemetry

func NewCounter

func NewCounter(name, description string, opts ...Options) Metric

NewCounter returns a new counter

type Options

type Options func(*options)

Options accepts a pointer to options. It is used to update the options by calling an array of functions

func WithMeter

func WithMeter(meter api.Meter) Options

WithMeter configures the given Meter

Jump to

Keyboard shortcuts

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