sentry

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: GPL-3.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttestationDataConfig

type AttestationDataConfig struct {
	Enabled bool `yaml:"enabled" default:"false"`

	AllCommittees bool `yaml:"allCommittees" default:"false"`

	Interval struct {
		Enabled bool           `yaml:"enabled" default:"false"`
		Every   human.Duration `yaml:"every" default:"12s"`
	} `yaml:"interval"`

	At struct {
		Enabled   bool             `yaml:"enabled" default:"false"`
		SlotTimes []human.Duration `yaml:"slotTimes"`
	} `yaml:"at"`
}

func (*AttestationDataConfig) Validate

func (f *AttestationDataConfig) Validate() error

type BeaconCommitteesConfig

type BeaconCommitteesConfig struct {
	Enabled bool `yaml:"enabled" default:"false"`
}

type Config

type Config struct {
	// Preset is the name of the preset to use
	Preset string `yaml:"preset"`

	LoggingLevel string  `yaml:"logging" default:"info"`
	MetricsAddr  string  `yaml:"metricsAddr" default:":9090"`
	PProfAddr    *string `yaml:"pprofAddr"`

	// The name of the sentry
	Name string `yaml:"name"`

	// Ethereum configuration
	Ethereum ethereum.Config `yaml:"ethereum"`

	// Outputs configuration
	Outputs []output.Config `yaml:"outputs"`

	// Labels configures the sentry with labels
	Labels map[string]string `yaml:"labels"`

	// NTP Server to use for clock drift correction
	NTPServer string `yaml:"ntpServer" default:"time.google.com"`

	// ForkChoice configuration
	ForkChoice *ForkChoiceConfig `yaml:"forkChoice" default:"{'enabled': false}"`

	// BeaconCommittees configuration
	BeaconCommittees *BeaconCommitteesConfig `yaml:"beaconCommittees" default:"{'enabled': false}"`

	// AttestationData configuration
	AttestationData *AttestationDataConfig `yaml:"attestationData" default:"{'enabled': false}"`

	// ProposerDuty configuration
	ProposerDuty *ProposerDutyConfig `yaml:"proposerDuty" default:"{'enabled': true}"`

	// ValidatorBlock configuration
	ValidatorBlock *ValidatorBlockConfig `yaml:"validatorBlock" default:"{'enabled': false}"`

	// Tracing configuration
	Tracing observability.TracingConfig `yaml:"tracing"`
}

func (*Config) CreateSinks

func (c *Config) CreateSinks(log logrus.FieldLogger) ([]output.Sink, error)

func (*Config) Validate

func (c *Config) Validate() error

type ForkChoiceConfig

type ForkChoiceConfig struct {
	Enabled bool `yaml:"enabled" default:"false"`

	OnReOrgEvent struct {
		Enabled bool `yaml:"enabled" default:"false"`
	} `yaml:"onReOrgEvent"`

	Interval struct {
		Enabled bool           `yaml:"enabled" default:"false"`
		Every   human.Duration `yaml:"every" default:"12s"`
	} `yaml:"interval"`

	At struct {
		Enabled   bool             `yaml:"enabled" default:"false"`
		SlotTimes []human.Duration `yaml:"slotTimes"`
	} `yaml:"at"`
}

func (*ForkChoiceConfig) Validate

func (f *ForkChoiceConfig) Validate() error

type Metrics

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

func NewMetrics

func NewMetrics(namespace string) *Metrics

func (*Metrics) AddDecoratedEvent

func (m *Metrics) AddDecoratedEvent(count int, eventType, networkID string)

type Override added in v0.0.200

type Override struct {
	MetricsAddr struct {
		Enabled bool
		Value   string
	}
	BeaconNodeURL struct {
		Enabled bool
		Value   string
	}
	XatuOutputAuth struct {
		Enabled bool
		Value   string
	}
	Preset struct {
		Enabled bool
		Value   string
	}
}

type Preset added in v0.0.200

type Preset struct {
	Name    string
	Aliases []string
	Value   []byte
}

func DefaultPresets added in v0.0.200

func DefaultPresets() []Preset

func GetPreset added in v0.0.200

func GetPreset(name string) (*Preset, error)

type ProposerDutyConfig added in v0.0.156

type ProposerDutyConfig struct {
	Enabled bool `yaml:"enabled" default:"true"`
}

type Sentry

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

func New

func New(ctx context.Context, log logrus.FieldLogger, config *Config, overrides *Override) (*Sentry, error)

func (*Sentry) ServeMetrics

func (s *Sentry) ServeMetrics(ctx context.Context) error

func (*Sentry) ServePProf

func (s *Sentry) ServePProf(ctx context.Context) error

func (*Sentry) Start

func (s *Sentry) Start(ctx context.Context) error

type Summary added in v1.0.6

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

Summary is a struct that holds the summary of the sentry.

func NewSummary added in v1.0.6

func NewSummary(log logrus.FieldLogger, printInterval time.Duration, beacon *ethereum.BeaconNode) *Summary

NewSummary creates a new summary with the given print interval.

func (*Summary) AddEventStreamEvents added in v1.0.6

func (s *Summary) AddEventStreamEvents(topic string, count uint64)

func (*Summary) AddEventsExported added in v1.0.6

func (s *Summary) AddEventsExported(count uint64)

func (*Summary) AddFailedEvents added in v1.0.6

func (s *Summary) AddFailedEvents(count uint64)

func (*Summary) GetEventStreamEvents added in v1.0.6

func (s *Summary) GetEventStreamEvents() map[string]uint64

func (*Summary) GetEventsExported added in v1.0.6

func (s *Summary) GetEventsExported() uint64

func (*Summary) GetFailedEvents added in v1.0.6

func (s *Summary) GetFailedEvents() uint64

func (*Summary) Print added in v1.0.6

func (s *Summary) Print()

func (*Summary) Reset added in v1.0.6

func (s *Summary) Reset()

func (*Summary) Start added in v1.0.6

func (s *Summary) Start(ctx context.Context)

type ValidatorBlockConfig added in v1.0.11

type ValidatorBlockConfig struct {
	Enabled bool `yaml:"enabled" default:"false"`

	Interval struct {
		Enabled bool           `yaml:"enabled" default:"false"`
		Every   human.Duration `yaml:"every" default:"12s"`
	} `yaml:"interval"`

	At struct {
		Enabled   bool             `yaml:"enabled" default:"false"`
		SlotTimes []human.Duration `yaml:"slotTimes"`
	} `yaml:"at"`
}

func (*ValidatorBlockConfig) Validate added in v1.0.11

func (f *ValidatorBlockConfig) Validate() error

Directories

Path Synopsis
event

Jump to

Keyboard shortcuts

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