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

internettelemetry

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Metric names.
	MetricNameErrors          = "doublezero_monitor_internet_telemetry_errors_total"
	MetricNameSamples         = "doublezero_monitor_internet_telemetry_samples_total"
	MetricNameSuccesses       = "doublezero_monitor_internet_telemetry_successes_total"
	MetricNameLosses          = "doublezero_monitor_internet_telemetry_losses_total"
	MetricNameAccountNotFound = "doublezero_monitor_internet_telemetry_account_not_found_total"

	// Labels.
	MetricLabelErrorType    = "error_type"
	MetricLabelCircuit      = "circuit"
	MetricLabelDataProvider = "data_provider"

	// Error types.
	MetricErrorTypeGetCircuits       = "get_circuits"
	MetricErrorTypeGetEpochInfo      = "get_epoch_info"
	MetricErrorTypeGetLatencySamples = "get_latency_samples"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CircuitTelemetryStats

type CircuitTelemetryStats struct {
	SuccessCount uint32
	LossCount    uint32
}

type Config

type Config struct {
	Logger                     *slog.Logger
	Metrics                    *Metrics
	LedgerRPCClient            LedgerRPCClient
	Serviceability             ServiceabilityClient
	InternetLatencyCollectorPK solana.PublicKey
	Telemetry                  TelemetryProgramClient
	Interval                   time.Duration
	MaxConcurrency             int
}

func (*Config) Validate

func (c *Config) Validate() error

type InternetTelemetryWatcher

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

func NewInternetTelemetryWatcher

func NewInternetTelemetryWatcher(cfg *Config) (*InternetTelemetryWatcher, error)

func (*InternetTelemetryWatcher) Name

func (w *InternetTelemetryWatcher) Name() string

func (*InternetTelemetryWatcher) Run

func (*InternetTelemetryWatcher) Tick

type LedgerRPCClient

type LedgerRPCClient interface {
	GetEpochInfo(ctx context.Context, commitment solanarpc.CommitmentType) (*solanarpc.GetEpochInfoResult, error)
}

type Metrics added in v0.6.3

type Metrics struct {
	Errors          *prometheus.CounterVec
	Samples         *prometheus.CounterVec
	Successes       *prometheus.CounterVec
	Losses          *prometheus.CounterVec
	AccountNotFound *prometheus.CounterVec
}

Metrics groups all Prometheus collectors for Internet telemetry.

func NewMetrics added in v0.6.3

func NewMetrics() *Metrics

NewMetrics constructs collectors but does not register them.

func (*Metrics) Register added in v0.6.3

func (m *Metrics) Register(r prometheus.Registerer)

Register all metrics with the provided registerer.

type ServiceabilityClient

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

type TelemetryProgramClient

type TelemetryProgramClient interface {
	GetInternetLatencySamples(ctx context.Context, dataProviderName string, originExchangePK, targetExchangePK, agentPK solana.PublicKey, epoch uint64) (*telemetry.InternetLatencySamples, error)
}

Jump to

Keyboard shortcuts

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