Documentation
¶
Index ¶
- Constants
- func TokenFor(tenantID, labels string) uint32
- type Config
- type Distributor
- func (d *Distributor) GetProfileLanguage(series *distributormodel.ProfileSeries) string
- func (d *Distributor) HealthyInstancesCount() int
- func (d *Distributor) Push(ctx context.Context, grpcReq *connect.Request[pushv1.PushRequest]) (*connect.Response[pushv1.PushResponse], error)
- func (d *Distributor) PushBatch(ctx context.Context, req *distributormodel.PushRequest) error
- func (d *Distributor) ServeHTTP(w http.ResponseWriter, req *http.Request)
- type Limits
- type PushClient
- type ReadLifecycler
- type ReceiveStage
Constants ¶
View Source
const (
ProfileName = "__name__"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
PushTimeout time.Duration
PoolConfig clientpool.PoolConfig `yaml:"pool_config,omitempty"`
// Distributors ring
DistributorRing util.CommonRingConfig `yaml:"ring"`
}
Config for a Distributor.
type Distributor ¶
Distributor coordinates replicates and distribution of log streams.
func New ¶
func New( config Config, ingesterRing ring.ReadRing, ingesterClientFactory ring_client.PoolFactory, limits Limits, reg prometheus.Registerer, logger log.Logger, segmentWriter writepath.SegmentWriterClient, ingesterClientsOptions ...connect.ClientOption, ) (*Distributor, error)
func (*Distributor) GetProfileLanguage ¶ added in v1.2.0
func (d *Distributor) GetProfileLanguage(series *distributormodel.ProfileSeries) string
func (*Distributor) HealthyInstancesCount ¶
func (d *Distributor) HealthyInstancesCount() int
HealthyInstancesCount implements the ReadLifecycler interface
We use a ring lifecycler delegate to count the number of members of the ring. The count is then used to enforce rate limiting correctly for each distributor. $EFFECTIVE_RATE_LIMIT = $GLOBAL_RATE_LIMIT / $NUM_INSTANCES
func (*Distributor) Push ¶
func (d *Distributor) Push(ctx context.Context, grpcReq *connect.Request[pushv1.PushRequest]) (*connect.Response[pushv1.PushResponse], error)
func (*Distributor) PushBatch ¶ added in v1.15.0
func (d *Distributor) PushBatch(ctx context.Context, req *distributormodel.PushRequest) error
func (*Distributor) ServeHTTP ¶
func (d *Distributor) ServeHTTP(w http.ResponseWriter, req *http.Request)
type Limits ¶
type Limits interface {
IngestionRateBytes(tenantID string) float64
IngestionBurstSizeBytes(tenantID string) int
IngestionLimit(tenantID string) *ingestlimits.Config
DistributorSampling(tenantID string) *sampling.Config
IngestionTenantShardSize(tenantID string) int
MaxLabelNameLength(tenantID string) int
MaxLabelValueLength(tenantID string) int
MaxLabelNamesPerSeries(tenantID string) int
MaxProfileSizeBytes(tenantID string) int
MaxProfileStacktraceSamples(tenantID string) int
MaxProfileStacktraceSampleLabels(tenantID string) int
MaxProfileStacktraceDepth(tenantID string) int
MaxProfileSymbolValueLength(tenantID string) int
MaxSessionsPerSeries(tenantID string) int
EnforceLabelsOrder(tenantID string) bool
IngestionRelabelingRules(tenantID string) []*relabel.Config
SampleTypeRelabelingRules(tenantID string) []*relabel.Config
DistributorUsageGroups(tenantID string) *validation.UsageGroupConfig
WritePathOverrides(tenantID string) writepath.Config
validation.ProfileValidationLimits
aggregator.Limits
}
type PushClient ¶
type ReadLifecycler ¶
type ReadLifecycler interface {
HealthyInstancesCount() int
}
ReadLifecycler represents the read interface to the lifecycler.
type ReceiveStage ¶ added in v1.15.0
type ReceiveStage string
const ( // StageReceived is the earliest stage and as soon as we begin processing a profile, // before any rate-limit/sampling checks StageReceived ReceiveStage = "received" // StageSampled is recorded after the profile is accepted by rate-limit/sampling checks StageSampled ReceiveStage = "sampled" // StageNormalized is recorded after the profile is validated and normalized. StageNormalized ReceiveStage = "normalized" )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.