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

[Backport release/3.4.x] feat: request debugging #12243

Merged
merged 9 commits into from
Feb 27, 2024

Conversation

ADD-SP
Copy link
Contributor

@ADD-SP ADD-SP commented Dec 25, 2023

@github-actions github-actions bot added core/proxy core/templates core/configuration chore Not part of the core functionality of kong, but still needed labels Dec 25, 2023
@ADD-SP ADD-SP force-pushed the add_sp/backport-req-dbg-34x branch 2 times, most recently from 1ee17e6 to db989e2 Compare December 26, 2023 06:19
@ADD-SP ADD-SP marked this pull request as ready for review December 26, 2023 07:08
@ADD-SP ADD-SP force-pushed the add_sp/backport-req-dbg-34x branch from db989e2 to ecdc2c7 Compare December 26, 2023 07:16
@ADD-SP ADD-SP requested review from chobits and dndx December 26, 2023 09:17
@ADD-SP ADD-SP force-pushed the add_sp/backport-req-dbg-34x branch from ecdc2c7 to b55cb63 Compare February 19, 2024 03:05
@github-actions github-actions bot added the core/wasm Everything relevant to [proxy-]wasm label Feb 19, 2024
ADD-SP and others added 8 commits February 27, 2024 09:25
KAG-1902

---------

Co-authored-by: Chrono <[email protected]>
Co-authored-by: Datong Sun <[email protected]>

(origin commit: 3c7b63b)
* tests(request-debug): only initialize DB once in test setup

This updates the test setup logic such that helpers.get_db_utils() is
only invoked once per test DB strategy.

BEFORE:
======= 30 tests from 1 test file ran. (64157.77 ms total)

AFTER:
======= 30 tests from 1 test file ran. (52507.36 ms total)

* tests(request-debug): truncate error.log before request

This updates the tests to truncate the error.log file before making a
request that will generate a log entry. The goal is to reduce the
overall amount of bytes that must be read from disk and searched
through.

* tests(request-debug): use line-wise parser for log entries

This updates the request debug log entry logic to use `io.lines()`
rather than reading the whole file at once. This improves performance
and memory usage in the worst-case scenarios of the function.

* tests(request-debug): ensure client connection is closed

(origin commit: 5f88f20)
Using request_id instead of debug_id for the output of the per request debugging feature.

Fix #KAG-2696

(origin commit: 71b6ea5)
Improve the performance of the request debugging feature.

- reduce the number of calls of ngx.ctx
- cache some functions at the module level
- delete debug request headers only when debug headers exist.
- reduce the number of calls of req_dyn_hook.runhooks().

KAG-2738

(origin commit: 35768ad)
…ted config

KAG-2808

---------

Co-authored-by: Datong Sun <[email protected]>

(origin commit: f0ca42b)
… synchronization with the EE code

(origin commit: f59e36b)
@ADD-SP ADD-SP force-pushed the add_sp/backport-req-dbg-34x branch from b55cb63 to b75c4fd Compare February 27, 2024 01:26
@ADD-SP ADD-SP merged commit 436c38f into release/3.4.x Feb 27, 2024
24 checks passed
@ADD-SP ADD-SP deleted the add_sp/backport-req-dbg-34x branch February 27, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Not part of the core functionality of kong, but still needed core/configuration core/proxy core/templates core/wasm Everything relevant to [proxy-]wasm size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants