Skip to content

Commit e44b6e9

Browse files
eliottnesskakkoyun
andauthored
refactor(appsec): disable error scrubbing on WAF error codes (#4159)
Co-authored-by: kakkoyun <[email protected]> Co-authored-by: eliott.bouhana <[email protected]>
1 parent 049fe0f commit e44b6e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/appsec/emitter/waf/metrics.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,9 @@ func (m *ContextMetrics) IncWafError(addrs libddwaf.RunAddressData, in error) {
351351

352352
if !errors.Is(in, waferrors.ErrTimeout) {
353353
logger := m.logger.With(telemetry.WithTags(m.baseTags))
354-
logger.Error("unexpected WAF error", slog.Any("error", telemetrylog.NewSafeError(in)))
354+
// This a known error origin all the ways to the tip of the error chain and since it impact WAF
355+
// behavior we really want to log it so we can investigate it so we don't wrap it in a safe error
356+
logger.Error("unexpected WAF error", slog.String("error.message", in.Error()))
355357
}
356358

357359
switch addrs.TimerKey {

0 commit comments

Comments
 (0)