monitor

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

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

Metrics holds application-level metrics instruments. Add counters, histograms, and gauges here as needed.

func NewMetrics

func NewMetrics() *Metrics

NewMetrics creates and registers application metrics.

func (*Metrics) Meter

func (m *Metrics) Meter() metric.Meter

Meter returns the underlying OpenTelemetry meter for creating custom metrics.

type Monitor

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

Monitor provides unified access to observability primitives: tracing, logging, and metrics.

func New

func New(logger hz_logger.Logger) *Monitor

New creates a new Monitor with the given logger.

func (*Monitor) Logger

func (m *Monitor) Logger() hz_logger.Logger

Logger returns the application logger.

func (*Monitor) Metrics

func (m *Monitor) Metrics() *Metrics

Metrics returns the application metrics.

func (*Monitor) StartSpan

func (m *Monitor) StartSpan(ctx context.Context, name string) (context.Context, trace.Span)

StartSpan starts a new span with the given name and returns the updated context and span.

func (*Monitor) Tracer

func (m *Monitor) Tracer() trace.Tracer

Tracer returns the OpenTelemetry tracer.

Jump to

Keyboard shortcuts

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