Skip to content

Commit

Permalink
serverless/appsec: use res.HasEvents()
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellzy committed Nov 22, 2023
1 parent 31a97fa commit 62daefe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/serverless/appsec/httpsec/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (lp *ProxyLifecycleProcessor) spanModifier(lastReqId string, chunk *pb.Trac
log.Debug("appsec: missing span tag http.status_code")
}

if res := lp.appsec.Monitor(ctx.toAddresses()); len(res.Events) > 0 {
if res := lp.appsec.Monitor(ctx.toAddresses()); res.HasEvents() {
setSecurityEventsTags(span, res.Events, reqHeaders, nil)
chunk.Priority = int32(sampler.PriorityUserKeep)

Expand Down

0 comments on commit 62daefe

Please sign in to comment.