Documentation
¶
Overview ¶
Package metrics provides a wrapper around the OpenTelemetry metrics API.
Index ¶
- func Initialize(ns string, conn *grpc.ClientConn) (func(context context.Context) error, error)
- func InitializeMetrics() error
- func IsInitialized() bool
- func Middleware() gin.HandlerFunc
- func NewCounter(name, description string) (c metric.Int64Counter, err error)
- func NewHistogram(name, description string) (c metric.Float64Histogram, err error)
- func NewUpDownCounter(name, description string) (c metric.Int64UpDownCounter, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
Initialize sets up the metrics using the given grpc connection and namespace.
func InitializeMetrics ¶
func InitializeMetrics() error
InitializeMetrics initializes the metrics middleware
func IsInitialized ¶
func IsInitialized() bool
IsInitialized returns true if the metrics have been successfully initialized.
func NewCounter ¶
func NewCounter(name, description string) (c metric.Int64Counter, err error)
NewCounter creates a new counter using the given name and description.
func NewHistogram ¶
func NewHistogram(name, description string) (c metric.Float64Histogram, err error)
NewHistogram creates a new histogram using the given name and description.
func NewUpDownCounter ¶
func NewUpDownCounter(name, description string) (c metric.Int64UpDownCounter, err error)
NewUpDownCounter creates a new up/down counter using the given name and description.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.