From 10f787abfbfca1af2c2397fcc7f02a2cd961ac3f Mon Sep 17 00:00:00 2001 From: Gavin Bunney <409207+gavinbunney@users.noreply.github.com> Date: Wed, 19 Oct 2022 09:48:54 -0700 Subject: [PATCH] Only capture the first failure state in passport future listener (#1347) --- .../zuul/netty/insights/PassportStateListener.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateListener.java b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateListener.java index ec987d03ad..17127f80b7 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateListener.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateListener.java @@ -48,8 +48,12 @@ public void operationComplete(Future future) throws Exception passport.add(successState); } else { - if (failState != null) - passport.add(failState); + if (failState != null) { + // only capture a single failure state event, + // as sending content errors will fire for all content chunks, + // and we only need the first one + passport.addIfNotAlready(failState); + } } } } \ No newline at end of file