Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Generator
- func (g *Generator) CheckReady(_ context.Context) error
- func (g *Generator) OnRingInstanceHeartbeat(*ring.BasicLifecycler, *ring.Desc, *ring.InstanceDesc)
- func (g *Generator) OnRingInstanceRegister(_ *ring.BasicLifecycler, ringDesc ring.Desc, instanceExists bool, _ string, ...) (ring.InstanceState, ring.Tokens)
- func (g *Generator) OnRingInstanceStopping(*ring.BasicLifecycler)
- func (g *Generator) OnRingInstanceTokens(*ring.BasicLifecycler, ring.Tokens)
- func (g *Generator) PushSnapshot(ctx context.Context, req *deeppb.PushSnapshotRequest) (*deeppb.PushSnapshotResponse, error)
- type ProcessorConfig
- type RingConfig
Constants ¶
View Source
const (
// RingKey is the key under which we store the metric-generator's ring in the KVStore.
RingKey = "metrics-generator"
)
Variables ¶
View Source
var ( ErrUnconfigured = errors.New("no metrics_generator.storage.path configured, metrics generator will be disabled") ErrReadOnly = errors.New("metrics-generator is shutting down") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Ring RingConfig `yaml:"ring"` Processor ProcessorConfig `yaml:"processor"` Registry registry.Config `yaml:"registry"` Storage storage.Config `yaml:"storage"` // MetricsIngestionSlack is the max amount of time passed since a span's start time // for the span to be considered in metrics generation MetricsIngestionSlack time.Duration `yaml:"metrics_ingestion_time_range_slack"` }
Config for a generator.
type Generator ¶
type Generator struct { services.Service deeppb.UnimplementedMetricsGeneratorServer // contains filtered or unexported fields }
func New ¶
func New(cfg *Config, overrides metricsGeneratorOverrides, reg prometheus.Registerer, logger log.Logger) (*Generator, error)
New makes a new Generator.
func (*Generator) OnRingInstanceHeartbeat ¶
func (g *Generator) OnRingInstanceHeartbeat(*ring.BasicLifecycler, *ring.Desc, *ring.InstanceDesc)
OnRingInstanceHeartbeat implements ring.BasicLifecyclerDelegate
func (*Generator) OnRingInstanceRegister ¶
func (g *Generator) OnRingInstanceRegister(_ *ring.BasicLifecycler, ringDesc ring.Desc, instanceExists bool, _ string, instanceDesc ring.InstanceDesc) (ring.InstanceState, ring.Tokens)
OnRingInstanceRegister implements ring.BasicLifecyclerDelegate
func (*Generator) OnRingInstanceStopping ¶
func (g *Generator) OnRingInstanceStopping(*ring.BasicLifecycler)
OnRingInstanceStopping implements ring.BasicLifecyclerDelegate
func (*Generator) OnRingInstanceTokens ¶
func (g *Generator) OnRingInstanceTokens(*ring.BasicLifecycler, ring.Tokens)
OnRingInstanceTokens implements ring.BasicLifecyclerDelegate
func (*Generator) PushSnapshot ¶
func (g *Generator) PushSnapshot(ctx context.Context, req *deeppb.PushSnapshotRequest) (*deeppb.PushSnapshotResponse, error)
type ProcessorConfig ¶
type ProcessorConfig struct {
SpanMetrics spanmetrics.Config `yaml:"span_metrics"`
}
func (*ProcessorConfig) RegisterFlagsAndApplyDefaults ¶
func (cfg *ProcessorConfig) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet)
type RingConfig ¶
type RingConfig struct { KVStore kv.Config `yaml:"kvstore"` HeartbeatPeriod time.Duration `yaml:"heartbeat_period"` HeartbeatTimeout time.Duration `yaml:"heartbeat_timeout"` InstanceID string `yaml:"instance_id"` InstanceInterfaceNames []string `yaml:"instance_interface_names"` InstanceAddr string `yaml:"instance_addr"` // Injected internally ListenPort int `yaml:"-"` }
func (*RingConfig) RegisterFlagsAndApplyDefaults ¶
func (cfg *RingConfig) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet)
func (*RingConfig) ToRingConfig ¶
func (cfg *RingConfig) ToRingConfig() ring.Config
Source Files ¶
Click to show internal directories.
Click to hide internal directories.