Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework request and response counters #2142

Closed
simitt opened this issue Apr 23, 2019 · 1 comment
Closed

Rework request and response counters #2142

simitt opened this issue Apr 23, 2019 · 1 comment
Assignees
Milestone

Comments

@simitt
Copy link
Contributor

simitt commented Apr 23, 2019

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.

@jalvz
Copy link
Contributor

jalvz commented May 1, 2019

oh sorry, wrong link :(

@jalvz jalvz reopened this May 1, 2019
@zube zube bot added [zube]: Inbox and removed [zube]: Done labels May 1, 2019
@graphaelli graphaelli added this to the 7.3 milestone Jun 11, 2019
@graphaelli graphaelli changed the title Rework request and response counters and log entries Rework request and response counters Jun 11, 2019
@jalvz jalvz self-assigned this Jun 12, 2019
@jalvz jalvz removed their assignment Jul 5, 2019
@graphaelli graphaelli removed this from the 7.3 milestone Jul 18, 2019
@simitt simitt mentioned this issue Jul 23, 2019
8 tasks
@graphaelli graphaelli added this to the 7.4 milestone Jul 23, 2019
@simitt simitt self-assigned this Jul 23, 2019
simitt added a commit to simitt/apm-server that referenced this issue Jul 24, 2019
simitt added a commit to simitt/apm-server that referenced this issue Jul 24, 2019
simitt added a commit to simitt/apm-server that referenced this issue Jul 24, 2019
simitt added a commit to simitt/apm-server that referenced this issue Jul 24, 2019
simitt added a commit to simitt/apm-server that referenced this issue Jul 30, 2019
simitt added a commit to simitt/apm-server that referenced this issue Jul 30, 2019
simitt added a commit to simitt/apm-server that referenced this issue Jul 30, 2019
simitt added a commit that referenced this issue Jul 30, 2019
simitt added a commit to simitt/apm-server that referenced this issue Aug 7, 2019
Introduce dedicated monitoring counter for root, sourcemap upload,
intake and agent config API.

implements elastic#2142
simitt added a commit to simitt/apm-server that referenced this issue Aug 7, 2019
simitt added a commit to simitt/apm-server that referenced this issue Aug 7, 2019
Introduce dedicated monitoring counter for root, sourcemap upload,
intake and agent config API.

implements elastic#2142
simitt added a commit that referenced this issue Aug 20, 2019
* [beater] Add context handlers and adapt log handling (#2492 )

related to #2201

* [beater] Introduce middleware logic and dedicated monitoring middleware (#2493)

partially implements #2142

* [beater] Improve Response Writing (#2494)

Change response write handling to set a response per context and then call write on the context. Introduce a shared beatertest package with testing helper structs and methods.

related to #2489

* [beater] Restructure beater package (#2518)

Create several packages inside the beater directory to better organize http framework logic. Adapt tests and code to new structure.

related to #2489

* More beater coverage (#2582)

Co-Authored-By: Gil Raphaelli <[email protected]>
simitt added a commit to simitt/apm-server that referenced this issue Aug 20, 2019
Introduce dedicated monitoring counter for root, sourcemap upload,
intake and agent config API.

implements elastic#2142
simitt added a commit to simitt/apm-server that referenced this issue Aug 20, 2019
* [beater] Add context handlers and adapt log handling (elastic#2492 )

related to elastic#2201

* [beater] Introduce middleware logic and dedicated monitoring middleware (elastic#2493)

partially implements elastic#2142

* [beater] Improve Response Writing (elastic#2494)

Change response write handling to set a response per context and then call write on the context. Introduce a shared beatertest package with testing helper structs and methods.

related to elastic#2489

* [beater] Restructure beater package (elastic#2518)

Create several packages inside the beater directory to better organize http framework logic. Adapt tests and code to new structure.

related to elastic#2489

* More beater coverage (elastic#2582)

Co-Authored-By: Gil Raphaelli <[email protected]>
simitt added a commit that referenced this issue Aug 20, 2019
* [beater] Add context handlers and adapt log handling (#2492 )

related to #2201

* [beater] Introduce middleware logic and dedicated monitoring middleware (#2493)

partially implements #2142

* [beater] Improve Response Writing (#2494)

Change response write handling to set a response per context and then call write on the context. Introduce a shared beatertest package with testing helper structs and methods.

related to #2489

* [beater] Restructure beater package (#2518)

Create several packages inside the beater directory to better organize http framework logic. Adapt tests and code to new structure.

related to #2489

* More beater coverage (#2582)

Co-Authored-By: Gil Raphaelli <[email protected]>
simitt added a commit that referenced this issue Aug 22, 2019
* Use separate monitoring counter per API

Introduce dedicated monitoring counter for root, sourcemap upload,
intake and agent config API.

implements #2142
simitt added a commit to simitt/apm-server that referenced this issue Aug 22, 2019
* Use separate monitoring counter per API

Introduce dedicated monitoring counter for root, sourcemap upload,
intake and agent config API.

implements elastic#2142
@simitt simitt closed this as completed Aug 23, 2019
simitt added a commit that referenced this issue Aug 23, 2019
…2618)

* [monitoring] Use separate monitoring counter per API (#2527)

* Use separate monitoring counter per API

Introduce dedicated monitoring counter for root, sourcemap upload,
intake and agent config API.

implements #2142

* Fix approval test
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

No branches or pull requests

3 participants