Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1513

[logback-access] Wrong duration reported by LogbackValve with spring-webflux

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None

    Description

      Spring Webflux manages request processing through reactive streams Publisher
      so if we want to log the request duration we have to wait for the end of the subscription which writes to the response.

      The problem with LogbackValve is when it calculates the elapsed time in the AccessEvent
      just after calling getNext().invoke, which is actually the duration of Publisher's creation and not the time it takes to subscribe to it and write to the HTTP response.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            gdrouet Guillaume DROUET
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: