Skip to content

Commit bfe1cd1

Browse files
committed
simplified ProtectionAction string
1 parent e40e798 commit bfe1cd1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/queryfrontend/protection.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ func GetProtectionResult(ctx context.Context) *ProtectionResult {
4343
func RuleActionToString(action RuleAction) string {
4444
switch action {
4545
case RuleActionLog:
46-
return "RuleActionLog"
46+
return "Log"
4747
case RuleActionBlock:
48-
return "RuleActionBlock"
48+
return "Block"
4949
default:
50-
return "Unknown RuleAction"
50+
return "Unknown"
5151
}
5252
}

pkg/queryfrontend/queryrange_logger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type MetricsRangeQueryLogging struct {
6161
// Protection fields
6262
ProtectionTriggered bool `json:"protectionTriggered"` // Whether a protection rule was triggered
6363
ProtectionRuleName string `json:"protectionRuleName"` // Name of the rule that triggered
64-
ProtectionAction string `json:"protectionAction"` // "RuleActionLog" or "RuleActionBlock"
64+
ProtectionAction string `json:"protectionAction"` // "Log" or "Block"
6565
}
6666

6767
// RangeQueryLogConfig holds configuration for range query logging.

0 commit comments

Comments
 (0)