Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregatorConfiguration ¶
type AggregatorConfiguration struct {
// HostID is the local host ID configuration.
HostID *hostid.Configuration `yaml:"hostID"`
// AggregationTypes configs the aggregation types.
AggregationTypes aggregation.TypesConfiguration `yaml:"aggregationTypes"`
// Common metric prefix.
MetricPrefix *string `yaml:"metricPrefix"`
// Counter metric prefix.
CounterPrefix *string `yaml:"counterPrefix"`
// Timer metric prefix.
TimerPrefix *string `yaml:"timerPrefix"`
// Gauge metric prefix.
GaugePrefix *string `yaml:"gaugePrefix"`
// Stream configuration for computing quantiles.
Stream streamConfiguration `yaml:"stream"`
// Client configuration.
Client aggclient.Configuration `yaml:"client"`
// Placement manager.
PlacementManager placementManagerConfiguration `yaml:"placementManager"`
// Hash type used for sharding.
HashType *sharding.HashType `yaml:"hashType"`
// Amount of time we buffer writes before shard cutover.
BufferDurationBeforeShardCutover time.Duration `yaml:"bufferDurationBeforeShardCutover"`
// Amount of time we buffer writes after shard cutoff.
BufferDurationAfterShardCutoff time.Duration `yaml:"bufferDurationAfterShardCutoff"`
// Amount of time we buffer timed metrics in the past.
BufferDurationForPastTimedMetric time.Duration `yaml:"bufferDurationForPastTimedMetric"`
// Amount of time we buffer timed metrics in the future.
BufferDurationForFutureTimedMetric time.Duration `yaml:"bufferDurationForFutureTimedMetric"`
// Resign timeout.
ResignTimeout time.Duration `yaml:"resignTimeout"`
// Flush times manager.
FlushTimesManager flushTimesManagerConfiguration `yaml:"flushTimesManager"`
// Election manager.
ElectionManager electionManagerConfiguration `yaml:"electionManager"`
// Flush manager.
FlushManager flushManagerConfiguration `yaml:"flushManager"`
// Flushing handler configuration.
Flush handler.FlushHandlerConfiguration `yaml:"flush"`
// Forwarding configuration.
Forwarding forwardingConfiguration `yaml:"forwarding"`
// EntryTTL determines how long an entry remains alive before it may be expired due to inactivity.
EntryTTL time.Duration `yaml:"entryTTL"`
// EntryCheckInterval determines how often entries are checked for expiration.
EntryCheckInterval time.Duration `yaml:"entryCheckInterval"`
// EntryCheckBatchPercent determines the percentage of entries checked in a batch.
EntryCheckBatchPercent float64 `yaml:"entryCheckBatchPercent" validate:"min=0.0,max=1.0"`
// MaxTimerBatchSizePerWrite determines the maximum timer batch size for each batched write.
MaxTimerBatchSizePerWrite int `yaml:"maxTimerBatchSizePerWrite" validate:"min=0"`
// Default storage policies.
DefaultStoragePolicies []policy.StoragePolicy `yaml:"defaultStoragePolicies" validate:"nonzero"`
// Maximum number of cached source sets.
MaxNumCachedSourceSets *int `yaml:"maxNumCachedSourceSets"`
// Whether to discard NaN aggregated values.
DiscardNaNAggregatedValues *bool `yaml:"discardNaNAggregatedValues"`
// Pool of counter elements.
CounterElemPool pool.ObjectPoolConfiguration `yaml:"counterElemPool"`
// Pool of timer elements.
TimerElemPool pool.ObjectPoolConfiguration `yaml:"timerElemPool"`
// Pool of gauge elements.
GaugeElemPool pool.ObjectPoolConfiguration `yaml:"gaugeElemPool"`
// Pool of entries.
EntryPool pool.ObjectPoolConfiguration `yaml:"entryPool"`
}
AggregatorConfiguration contains aggregator configuration.
func (*AggregatorConfiguration) NewAggregatorOptions ¶
func (c *AggregatorConfiguration) NewAggregatorOptions( address string, client client.Client, runtimeOptsManager aggruntime.OptionsManager, instrumentOpts instrument.Options, ) (aggregator.Options, error)
NewAggregatorOptions creates a new set of aggregator options.
type Configuration ¶
type Configuration struct {
// Logging configuration.
Logging log.Configuration `yaml:"logging"`
// Metrics configuration.
Metrics instrument.MetricsConfiguration `yaml:"metrics"`
// Raw TCP server configuration.
RawTCP RawTCPServerConfiguration `yaml:"rawtcp"`
// HTTP server configuration.
HTTP HTTPServerConfiguration `yaml:"http"`
// Client configuration for key value store.
KVClient KVClientConfiguration `yaml:"kvClient" validate:"nonzero"`
// Runtime options configuration.
RuntimeOptions RuntimeOptionsConfiguration `yaml:"runtimeOptions"`
// Aggregator configuration.
Aggregator AggregatorConfiguration `yaml:"aggregator"`
}
Configuration contains top-level configuration.
type HTTPServerConfiguration ¶
type HTTPServerConfiguration struct {
// HTTP server listening address.
ListenAddress string `yaml:"listenAddress" validate:"nonzero"`
// HTTP server read timeout.
ReadTimeout time.Duration `yaml:"readTimeout"`
// HTTP server write timeout.
WriteTimeout time.Duration `yaml:"writeTimeout"`
}
HTTPServerConfiguration contains http server configuration.
func (*HTTPServerConfiguration) NewServerOptions ¶
func (c *HTTPServerConfiguration) NewServerOptions() http.Options
NewServerOptions create a new set of http server options.
type KVClientConfiguration ¶
type KVClientConfiguration struct {
Etcd *etcdclient.Configuration `yaml:"etcd"`
}
KVClientConfiguration configures the client for the key-value store. TODO(xichen): add configuration for in-memory client with pre-populated data for different namespaces so we can start up m3aggregator without a real etcd cluster.
func (*KVClientConfiguration) NewKVClient ¶
func (c *KVClientConfiguration) NewKVClient( instrumentOpts instrument.Options, ) (client.Client, error)
NewKVClient creates a new KV client.
type RawTCPServerConfiguration ¶
type RawTCPServerConfiguration struct {
// Raw TCP server listening address.
ListenAddress string `yaml:"listenAddress" validate:"nonzero"`
// Error log limit per second.
ErrorLogLimitPerSecond *int64 `yaml:"errorLogLimitPerSecond"`
// Whether keep alives are enabled on connections.
KeepAliveEnabled *bool `yaml:"keepAliveEnabled"`
// KeepAlive period.
KeepAlivePeriod *time.Duration `yaml:"keepAlivePeriod"`
// Retry mechanism configuration.
Retry retry.Configuration `yaml:"retry"`
// Read buffer size.
ReadBufferSize *int `yaml:"readBufferSize"`
// Msgpack iterator configuration.
MsgpackIterator msgpackUnaggregatedIteratorConfiguration `yaml:"msgpackIterator"`
// Protobuf iterator configuration.
ProtobufIterator protobufUnaggregatedIteratorConfiguration `yaml:"protobufIterator"`
}
RawTCPServerConfiguration contains raw TCP server configuration.
func (*RawTCPServerConfiguration) NewServerOptions ¶
func (c *RawTCPServerConfiguration) NewServerOptions( instrumentOpts instrument.Options, ) rawtcp.Options
NewServerOptions create a new set of raw TCP server options.
type RuntimeOptionsConfiguration ¶
type RuntimeOptionsConfiguration struct {
KVConfig kv.OverrideConfiguration `yaml:"kvConfig"`
WriteValuesPerMetricLimitPerSecondKey string `yaml:"writeValuesPerMetricLimitPerSecondKey" validate:"nonzero"`
WriteValuesPerMetricLimitPerSecond int64 `yaml:"writeValuesPerMetricLimitPerSecond"`
WriteNewMetricLimitClusterPerSecondKey string `yaml:"writeNewMetricLimitClusterPerSecondKey" validate:"nonzero"`
WriteNewMetricLimitClusterPerSecond int64 `yaml:"writeNewMetricLimitClusterPerSecond"`
WriteNewMetricNoLimitWarmupDuration time.Duration `yaml:"writeNewMetricNoLimitWarmupDuration"`
}
RuntimeOptionsConfiguration configures runtime options.
func (RuntimeOptionsConfiguration) NewRuntimeOptionsManager ¶
func (c RuntimeOptionsConfiguration) NewRuntimeOptionsManager() runtime.OptionsManager
NewRuntimeOptionsManager creates a new runtime options manager.
func (RuntimeOptionsConfiguration) WatchRuntimeOptionChanges ¶
func (c RuntimeOptionsConfiguration) WatchRuntimeOptionChanges( client client.Client, runtimeOptsManager runtime.OptionsManager, placementManager aggregator.PlacementManager, logger log.Logger, )
WatchRuntimeOptionChanges watches runtime option updates.