Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Generator
- func (g *Generator) CheckReady(_ context.Context) error
- func (g *Generator) OnRingInstanceHeartbeat(lifecycler *ring.BasicLifecycler, ringDesc *ring.Desc, ...)
- func (g *Generator) OnRingInstanceRegister(lifecycler *ring.BasicLifecycler, ringDesc ring.Desc, instanceExists bool, ...) (ring.InstanceState, ring.Tokens)
- func (g *Generator) OnRingInstanceStopping(lifecycler *ring.BasicLifecycler)
- func (g *Generator) OnRingInstanceTokens(lifecycler *ring.BasicLifecycler, tokens ring.Tokens)
- func (g *Generator) PushSpans(ctx context.Context, req *tempopb.PushSpansRequest) (*tempopb.PushResponse, 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 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"` }
Config for a generator.
type Generator ¶
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(lifecycler *ring.BasicLifecycler, ringDesc *ring.Desc, instanceDesc *ring.InstanceDesc)
OnRingInstanceHeartbeat implements ring.BasicLifecyclerDelegate
func (*Generator) OnRingInstanceRegister ¶
func (g *Generator) OnRingInstanceRegister(lifecycler *ring.BasicLifecycler, ringDesc ring.Desc, instanceExists bool, instanceID string, instanceDesc ring.InstanceDesc) (ring.InstanceState, ring.Tokens)
OnRingInstanceRegister implements ring.BasicLifecyclerDelegate
func (*Generator) OnRingInstanceStopping ¶
func (g *Generator) OnRingInstanceStopping(lifecycler *ring.BasicLifecycler)
OnRingInstanceStopping implements ring.BasicLifecyclerDelegate
func (*Generator) OnRingInstanceTokens ¶
func (g *Generator) OnRingInstanceTokens(lifecycler *ring.BasicLifecycler, tokens ring.Tokens)
OnRingInstanceTokens implements ring.BasicLifecyclerDelegate
func (*Generator) PushSpans ¶
func (g *Generator) PushSpans(ctx context.Context, req *tempopb.PushSpansRequest) (*tempopb.PushResponse, error)
type ProcessorConfig ¶
type ProcessorConfig struct { ServiceGraphs servicegraphs.Config `yaml:"service_graphs"` 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.