observability

package
v2.4.1-0...-6c2315b Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunnerRoleAttrKey = "ssv.runner.role"
)

Variables

This section is empty.

Functions

func BeaconBlockHashAttribute

func BeaconBlockHashAttribute(hash phase0.Hash32) attribute.KeyValue

func BeaconBlockIsBlindedAttribute

func BeaconBlockIsBlindedAttribute(isBlinded bool) attribute.KeyValue

func BeaconBlockParentRootAttribute

func BeaconBlockParentRootAttribute(root [32]byte) attribute.KeyValue

func BeaconBlockRootAttribute

func BeaconBlockRootAttribute(root [32]byte) attribute.KeyValue

func BeaconBlockRootCountAttribute

func BeaconBlockRootCountAttribute(count int) attribute.KeyValue

func BeaconEpochAttribute

func BeaconEpochAttribute(epoch phase0.Epoch) attribute.KeyValue

func BeaconPeriodAttribute

func BeaconPeriodAttribute(period uint64) attribute.KeyValue

func BeaconRoleAttribute

func BeaconRoleAttribute(role spectypes.BeaconRole) attribute.KeyValue

func BeaconSlotAttribute

func BeaconSlotAttribute(slot phase0.Slot) attribute.KeyValue

func BeaconVersionAttribute

func BeaconVersionAttribute(version spec.DataVersion) attribute.KeyValue

func CommitteeIDAttribute

func CommitteeIDAttribute(id spectypes.CommitteeID) attribute.KeyValue

func CommitteeIndexAttribute

func CommitteeIndexAttribute(index phase0.CommitteeIndex) attribute.KeyValue

func DutyCountAttribute

func DutyCountAttribute(count int) attribute.KeyValue

func DutyIDAttribute

func DutyIDAttribute(id string) attribute.KeyValue

func DutyRoundAttribute

func DutyRoundAttribute(round specqbft.Round) attribute.KeyValue

func Initialize

func Initialize(ctx context.Context, appName, appVersion string, options ...Option) (shutdown func(context.Context) error, err error)

func InstrumentName

func InstrumentName(namespace, name string) string

func NetworkDirectionAttribute

func NetworkDirectionAttribute(direction network.Direction) attribute.KeyValue

func RoundChangeReasonAttribute

func RoundChangeReasonAttribute(reason string) attribute.KeyValue

func RunnerRoleAttribute

func RunnerRoleAttribute(role spectypes.RunnerRole) attribute.KeyValue

func Uint64AttributeValue

func Uint64AttributeValue(value uint64) attribute.Value

func ValidatorCountAttribute

func ValidatorCountAttribute(count int) attribute.KeyValue

func ValidatorEventTypeAttribute

func ValidatorEventTypeAttribute(t protocolTypes.EventType) attribute.KeyValue

func ValidatorHasQuorumAttribute

func ValidatorHasQuorumAttribute(hasQuorum bool) attribute.KeyValue

func ValidatorIndexAttribute

func ValidatorIndexAttribute(index phase0.ValidatorIndex) attribute.KeyValue

func ValidatorMsgIDAttribute

func ValidatorMsgIDAttribute(msgID spectypes.MessageID) attribute.KeyValue

func ValidatorMsgTypeAttribute

func ValidatorMsgTypeAttribute(msgType spectypes.MsgType) attribute.KeyValue

func ValidatorProposerAttribute

func ValidatorProposerAttribute(proposer spectypes.OperatorID) attribute.KeyValue

func ValidatorPublicKeyAttribute

func ValidatorPublicKeyAttribute(pubKey phase0.BLSPubKey) attribute.KeyValue

Types

type Config

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

type Option

type Option func(*Config)

func WithLogger

func WithLogger(level, levelFormat, format, filePath string, fileSize, fileBackups int) Option

WithLogger configures the global application logger. It sets log level, format, output file settings, and enables the logger. If this option is not applied, a no-op logger will be used instead.

func WithMetrics

func WithMetrics() Option

WithMetrics enables OpenTelemetry metrics collection for the application. When enabled, a Prometheus provider will be initialized. This means Prometheus will scrape metrics from a specific HTTP endpoint, so ensure the Prometheus HTTP handler is configured properly in the app.

func WithTraces

func WithTraces() Option

WithTraces enables OpenTelemetry tracing for the application. When traces are enabled, the OTEL_EXPORTER_OTLP_TRACES_ENDPOINT environment variable must be set. Additional configuration can be provided through other OTEL_* environment variables as described in the official OpenTelemetry documentation.

Directories

Path Synopsis
log
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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