-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improved Logging and Header Propagation in Orka #339
Merged
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
nikostoulas
requested review from
jgerbe,
klesgidis,
kzacharakis,
nikosd23 and
stavros-wb
as code owners
October 3, 2023 12:06
manoskouvarakis
approved these changes
Oct 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
@nikostoulas Should we maybe add the breaking changes on readme or it will be a part of another PR? |
You mean the orka's version changelog? Yes it will be part of another one |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The main focus is on improving logging and header propagation.
Non json logger is improved to log all propagated headers.
Messages in RabbitMQ by default now propagated all headers.
Configuration is updated and istioTraceContextHeaders is merged with headerPropagation into a new more generic property:
propagatedHeaders
This is not backwards compatible so a major release will need to follow when merging this pr.
Best reviewed commit by commit.
Aoart from propagated headers 3 new headers are introduced:
x-depth
-> increased by 1 every time headers are propagated (e.g. to a rabbitmq publish or http call)x-parent-id
-> is the previous traceHeaderName id. The new traceHeaderName id is a new random one and this happens every 2 hopsx-initiator-id
-> when ax-parent-id
id replaced the initial traceHeaderName is added in the context here so that we can search with the initial id and find all changesChanges
propagatedHeaders
and utilities for managing themalsSupported
chalk
library for better console outputsJira tickets
Before
Performance
After
Performance
Example tests were run:
npx nodemon examples/request-context-example/app.js
Way of running performance tests:
ab -k -n 100000 -c 1 -H 'x-orka-request-id: bar' localhost:2121/log
Performance impact is not insignificant but would be negligible part of an http endpoint that accesses IO operations (e.g. database/ network)