metrics

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelBridge = "bridge"
	LabelTunnel = "tunnel"

	LabelProbeSrc = "probe_location_src"
	LabelProbeDst = "probe_location_dst"

	LabelErrorScope = "scope"
)
View Source
const (
	ScopeHTTPMiddleware = "http_middleware"
	ScopeInternalLogic  = "internal_logic"
	ScopePartnerPolling = "partner_polling"
	ScopePeerProbing    = "peer_probing"
	ScopeStatusListener = "status_listener"
	ScopeSystem         = "system"
)

Variables

View Source
var (
	// BridgeActive indicates whether the bridge is currently active
	BridgeActive otelapi.Int64Observable

	// BridgeUp indicates whether the bridge is currently up
	BridgeUp otelapi.Int64Observable

	// TunnelInterfaceActive indicates whether the tunnel interface is active
	TunnelInterfaceActive otelapi.Int64Observable

	// TunnelInterfaceUp indicates whether the tunnel interface is up
	TunnelInterfaceUp otelapi.Int64Observable
)
View Source
var (
	// ProbesSent is a counter for the sent probes
	ProbesSent otelapi.Int64Counter

	// ProbesReturned is a counter for the returned probes
	ProbesReturned otelapi.Int64Counter

	// ProbesFailed is a counter for the failed probes
	ProbesFailed otelapi.Int64Counter

	// ProbesLatencyForward is the latency of probes on the way there
	ProbesLatencyForward otelapi.Float64Histogram

	// ProbesLatencyReturn is the latency of probes on the way back
	ProbesLatencyReturn otelapi.Float64Histogram
)
View Source
var (
	// Errors is a counter for the errors
	Errors otelapi.Int64Counter
)
View Source
var (
	// Version reports service Version via metric label
	Version otelapi.Int64Gauge
)

Functions

func Setup

func Setup(
	ctx context.Context,
	cfg *config.Metrics,
	observer func(context.Context, otelapi.Observer) error,
) error

Types

type Server

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

func NewServer

func NewServer(ctx context.Context, cfg *config.Metrics) *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context, failureSink chan<- error)

func (*Server) Stop

func (s *Server) Stop(ctx context.Context)

Jump to

Keyboard shortcuts

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