Skip to content

Commit

Permalink
Loki: Introduce new limited_log_push_errors. (#9568)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:
Introduce a new configuration named `limited_log_push_errors` that will
be implemented.
The configuration is being introduced on a separated PR to facilitate
future rollbacks.

**Which issue(s) this PR fixes**:
N/A
  • Loading branch information
DylanGuedes authored May 30, 2023
1 parent 0a2f588 commit 3941767
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/runtime/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ type Config struct {
LogStreamCreation bool `yaml:"log_stream_creation"`
LogPushRequest bool `yaml:"log_push_request"`
LogPushRequestStreams bool `yaml:"log_push_request_streams"`

// LimitedLogPushErrors is to be implemented and will allow logging push failures at a controlled pace.
// TODO(dylanguedes): implement it.
LimitedLogPushErrors bool `yaml:"limited_log_push_errors"`
}

// TenantConfig is a function that returns configs for given tenant, or
Expand Down Expand Up @@ -54,3 +58,7 @@ func (o *TenantConfigs) LogPushRequest(userID string) bool {
func (o *TenantConfigs) LogPushRequestStreams(userID string) bool {
return o.getOverridesForUser(userID).LogPushRequestStreams
}

func (o *TenantConfigs) LimitedLogPushErrors(userID string) bool {
return o.getOverridesForUser(userID).LimitedLogPushErrors
}

0 comments on commit 3941767

Please sign in to comment.