-
Notifications
You must be signed in to change notification settings - Fork 5
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
logging enhancements #57
Conversation
7c051c0
to
f2138c8
Compare
TODO in future PR's: review logging traces again under heavy traffic stress. When multiple requests hit "at the same time", try to see if one single request can be traced for debugging. |
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.
Changes look good to me. I guess my only question is the reason for moving the context id to the end of the line? I guess it's personal preference? I'm undecided whether it's easier to identify the logs you're looking for with the identifier at the start vs at the end
I guess to add to my thoughts there - if there is going to be logs with different context id's interleaved would it not be easier to debug with the context id at the start instead of having to look at the end of each log first? |
Fair point. Not a strong opinion here. I saw there was some logs doing that and I tried to apply some consistency. I will add at the start |
For the record: the context id is related to the connection. Multiple (slow) requests share the same context id (tested). Following same approach as the example from rust-sdk lib https://github.com/proxy-wasm/proxy-wasm-rust-sdk/blob/main/examples/http_headers/src/lib.rs#L46-L48 for (name, value) in &self.get_http_request_headers() {
info!("#{} -> {}: {}", self.context_id, name, value);
} |
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.
🔎
What
debug
level.#{}
at the end of the log line.