Help us shape the future of Go! Take the 2026 Go Developer Survey

serviceability

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Metrics names.
	MetricNameErrors           = "doublezero_monitor_serviceability_errors_total"
	MetricNameProgramBuildInfo = "doublezero_monitor_serviceability_program_build_info"

	// Labels.
	MetricLabelErrorType      = "error_type"
	MetricLabelProgramVersion = "program_version"

	// Error types.
	MetricErrorTypeGetProgramData = "get_program_data"
)

Variables

View Source
var (
	MetricErrors = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: MetricNameErrors,
			Help: "Number of errors encountered",
		},
		[]string{MetricLabelErrorType},
	)

	MetricProgramBuildInfo = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: MetricNameProgramBuildInfo,
			Help: "Program build info",
		},
		[]string{MetricLabelProgramVersion},
	)
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger         *slog.Logger
	Serviceability ServiceabilityClient
	Interval       time.Duration
}

func (*Config) Validate

func (c *Config) Validate() error

type ServiceabilityClient

type ServiceabilityClient interface {
	GetProgramData(context.Context) (*serviceability.ProgramData, error)
}

type ServiceabilityWatcher

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

func NewServiceabilityWatcher

func NewServiceabilityWatcher(cfg *Config) (*ServiceabilityWatcher, error)

func (*ServiceabilityWatcher) Name

func (w *ServiceabilityWatcher) Name() string

func (*ServiceabilityWatcher) Run

func (*ServiceabilityWatcher) Tick

Jump to

Keyboard shortcuts

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