Skip to content

Rework request and response counters #2142

@simitt

Description

@simitt

At the moment the request and response counters, as well as the log entries for requests and responses are spread between the various handler files in the beater directory.

I suggest to move the logic to a central place and wrap all requests with it. We already have a logHandler wrapped around requests. This log handler should be adapted so that it also has access to errors. See if recordingResponseWriter can be adapted and used for this.

For the counters we should add something similar, by adding a dedicated counterHandler that ensures all the counters are set properly and removes the clutter from the beater package.

While on it, we could add system tests to check that logs actually contain expected log messages, as the testing for logs is rather sparse.

Update:
This issue has been split into 2 issues. Everything concerning improvements of the log handling has been moved to #2201.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions