• Brian Clozel's avatar
    Fix "status" metrics tag for error responses · 77be10e7
    Brian Clozel authored
    Prior to this commit, the metrics `WebFilter` would handle exceptions
    flowing through the pipeline and extract tag information right away.
    Since error handling turns the exception information into error HTTP
    responses later in the chain, the information extracted from the
    response earlier is invalid.
    In this case, the "status" information could be "200" whereas error
    handlers would later set that status to "500".
    
    This commit delays the tags extraction later in the process, right
    before the response is comitted. The happy path is not changed, as
    handlers signal that the response is fully taken care of at that point.
    
    Fixes gh-11514
    77be10e7
Name
Last commit
Last update
.github Loading commit data...
.mvn Loading commit data...
ci Loading commit data...
eclipse Loading commit data...
spring-boot-project Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-samples-invoker Loading commit data...
spring-boot-tests Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
SUPPORT.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...