-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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/2.8.x] feat(request-id): introduce Request ID (#11663) #12007
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
samugi
force-pushed
the
cherry-pick/request-id-11624-28x
branch
6 times, most recently
from
November 13, 2023 17:29
96719da
to
54fd835
Compare
samugi
force-pushed
the
cherry-pick/request-id-11624-28x
branch
from
November 14, 2023 16:09
54fd835
to
828ff9a
Compare
bungle
approved these changes
Nov 14, 2023
nowNick
approved these changes
Nov 15, 2023
samugi
force-pushed
the
cherry-pick/request-id-11624-28x
branch
from
November 15, 2023 11:25
828ff9a
to
b6bf07e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
* feat(request-id): add Request ID * Add an immutable request ID * Include request ID + trace and correlation IDs to the log serializer * update Access log and Error log to append request id * update the error templates to include the request id * Bump lua-kong-nginx-module to version 0.7.1 * Use the new directive `lua_kong_error_log_request_id` introduced in 0.7.0 which adds the request id to the error log output Includes: * unit tests for the new `request_id` module * integration tests to check: * request id, correlation id, trace ids are added to log serializer * feat(request-id): add request-id to error templates * feat(request-id): request ID header + span attribute * add the x-kong-request-id downstream header which contains the value of the request_id, and can be controlled via the `headers` config option * add the x-kong-request-id upstream header which contains the value of the request_id, and can be controlled via the `headers_upstream` config option * add the `kong.request.id` span attribute which contains the value of the request_id * tests for all the above * docs(conf): request ID Co-authored-by: Enrique García Cota <kikito@gmail.com> * feat(request-id): address PR feedback * rephrase log messages * remove unneeded conditional * better changelog * use upvalues to cache headers access * use request id instead of kong_request_id (no longer needed as we don't need write access) * cache locals in hot path * improved performance of add_trace_id_formats function * refactored docs in kong.conf.default * perf: cache `request_id.get()` at the module level KAG-2034 FTI-4837 --------- Co-authored-by: Enrique García Cota <kikito@gmail.com> Co-authored-by: Qi <qiqi.zhang@konghq.com>
samugi
force-pushed
the
cherry-pick/request-id-11624-28x
branch
from
November 15, 2023 12:37
b6bf07e
to
efd533e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Backport of:
feat(request-id): introduce Request ID #11624[reopened] feat(request-id): introduce Request ID #11663to port the request ID feature to release/3.4.x
Includes a bump of lua-kong-nginx-module to 0.2.2.
Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdFull changelog
Issue reference
KAG-3040