Skip to content

Conversation

@paulmillar
Copy link
Member

Motivaition:

The information about HTTP-based requests (WebDAV and REST) are only logged in the access log file when the request has been processed.

Currently, this logging only happens if the request is handled normally; i.e., no exception was thrown and (for async requests) the processing didn't take too long.

This means that a request that triggers certain failure modes would not have an entry in the access log file.

Modification:

Update existing requestCompleted method to accept a NetLoggerBuilder consumer. This consumer should add any mode-specific additional logging information.

Create methods that handle the three modes in which the processing of a request might finish: requestCompletedNormally,
requestCompletedExceptionally, requestTimedOut. All three modes add mode-specific information to the access log entry.

The access log entry key-value pairs derived from the response are moved to the requestCompletedNormally method. The other modes will use default responses, rendering this information unreliable in those cases.

The async listener LogOnComplete is updated so that onTimeout and onError event notification trigger requestTimedOut and requestCompletedExceptionally logging, respectively.

The NetLoggerBuilder class is updated to accept key-value pairs where the value has type Duration.

Result:

Fix bug where webdav and frontend door access log files would fail to log requests that trigger certain failures in dCache.

Target: master
Requires-notes: yes
Requires-book: no
Request: 11.1
Request: 11.0
Request: 10.2
Request: 10.1
Request: 10.0
Request: 9.2
Closes: #7939
Patch: https://rb.dcache.org/r/14581/
Acked-by: Tigran Mkrtchyan

Motivaition:

The information about HTTP-based requests (WebDAV and REST) are only
logged in the access log file when the request has been processed.

Currently, this logging only happens if the request is handled normally;
i.e., no exception was thrown and (for async requests) the processing
didn't take too long.

This means that a request that triggers certain failure modes would not
have an entry in the access log file.

Modification:

Update existing `requestCompleted` method to accept a `NetLoggerBuilder`
consumer.  This consumer should add any mode-specific additional logging
information.

Create methods that handle the three modes in which the processing of a
request might finish: `requestCompletedNormally`,
`requestCompletedExceptionally`, `requestTimedOut`.  All three modes add
mode-specific information to the access log entry.

The access log entry key-value pairs derived from the response are moved
to the `requestCompletedNormally` method.  The other modes will use
default responses, rendering this information unreliable in those cases.

The async listener `LogOnComplete` is updated so that `onTimeout` and
`onError` event notification trigger `requestTimedOut` and
`requestCompletedExceptionally` logging, respectively.

The `NetLoggerBuilder` class is updated to accept key-value pairs where
the value has type Duration.

Result:

Fix bug where webdav and frontend door access log files would fail to
log requests that trigger certain failures in dCache.

Target: master
Requires-notes: yes
Requires-book: no
Request: 11.1
Request: 11.0
Request: 10.2
Request: 10.1
Request: 10.0
Request: 9.2
Closes: dCache#7939
Patch: https://rb.dcache.org/r/14581/
Acked-by: Tigran Mkrtchyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant