File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ type Limits interface {
126
126
IngestionRateBytes (tenantID string ) float64
127
127
IngestionBurstSizeBytes (tenantID string ) int
128
128
IngestionLimit (tenantID string ) * ingest_limits.Config
129
- SamplingProbability (tenantID string ) * sampling.Config
129
+ DistributorSampling (tenantID string ) * sampling.Config
130
130
IngestionTenantShardSize (tenantID string ) int
131
131
MaxLabelNameLength (tenantID string ) int
132
132
MaxLabelValueLength (tenantID string ) int
@@ -901,7 +901,7 @@ func (d *Distributor) checkUsageGroupsIngestLimit(req *distributormodel.PushRequ
901
901
}
902
902
903
903
func (d * Distributor ) shouldSample (tenantID string , groupsInRequest []validation.UsageGroupMatchName ) bool {
904
- l := d .limits .SamplingProbability (tenantID )
904
+ l := d .limits .DistributorSampling (tenantID )
905
905
if l == nil {
906
906
return true
907
907
}
Original file line number Diff line number Diff line change @@ -2646,7 +2646,7 @@ func TestDistributor_shouldSample(t *testing.T) {
2646
2646
t .Run (tt .name , func (t * testing.T ) {
2647
2647
overrides := validation .MockOverrides (func (defaults * validation.Limits , tenantLimits map [string ]* validation.Limits ) {
2648
2648
l := validation .MockDefaultLimits ()
2649
- l .Sampling = tt .samplingConfig
2649
+ l .DistributorSampling = tt .samplingConfig
2650
2650
tenantLimits [tt .tenantID ] = l
2651
2651
})
2652
2652
d := & Distributor {
@@ -2692,7 +2692,7 @@ func TestDistributor_shouldSample_Probability(t *testing.T) {
2692
2692
2693
2693
overrides := validation .MockOverrides (func (defaults * validation.Limits , tenantLimits map [string ]* validation.Limits ) {
2694
2694
l := validation .MockDefaultLimits ()
2695
- l .Sampling = samplingConfig
2695
+ l .DistributorSampling = samplingConfig
2696
2696
tenantLimits [tenantID ] = l
2697
2697
})
2698
2698
d := & Distributor {
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ type Limits struct {
36
36
IngestionRateMB float64 `yaml:"ingestion_rate_mb" json:"ingestion_rate_mb"`
37
37
IngestionBurstSizeMB float64 `yaml:"ingestion_burst_size_mb" json:"ingestion_burst_size_mb"`
38
38
IngestionLimit * ingest_limits.Config `yaml:"ingestion_limit" json:"ingestion_limit" category:"advanced" doc:"hidden"`
39
- Sampling * sampling.Config `yaml:"sampling " json:"sampling " category:"advanced" doc:"hidden"`
39
+ DistributorSampling * sampling.Config `yaml:"distributor_sampling " json:"distributor_sampling " category:"advanced" doc:"hidden"`
40
40
MaxLabelNameLength int `yaml:"max_label_name_length" json:"max_label_name_length"`
41
41
MaxLabelValueLength int `yaml:"max_label_value_length" json:"max_label_value_length"`
42
42
MaxLabelNamesPerSeries int `yaml:"max_label_names_per_series" json:"max_label_names_per_series"`
@@ -292,8 +292,8 @@ func (o *Overrides) IngestionLimit(tenantID string) *ingest_limits.Config {
292
292
return o .getOverridesForTenant (tenantID ).IngestionLimit
293
293
}
294
294
295
- func (o * Overrides ) SamplingProbability (tenantID string ) * sampling.Config {
296
- return o .getOverridesForTenant (tenantID ).Sampling
295
+ func (o * Overrides ) DistributorSampling (tenantID string ) * sampling.Config {
296
+ return o .getOverridesForTenant (tenantID ).DistributorSampling
297
297
}
298
298
299
299
// IngestionTenantShardSize returns the ingesters shard size for a given user.
You can’t perform that action at this time.
0 commit comments