3 ms·
Some good advice here. I would also suggest adding a build ID to the log message along with the other optional fields, this being the version of the software th
by thamer 4y ago
Some good advice here. I would also suggest adding a build ID to the log message along with the other optional fields, this being the version of the software that logged the message. It can help track down incompatibility issues, especially those that happen during the deployment of server-side software.
For example if you're on version X and in the process of deploying version Y, when service A sends a request to service B you have 4 distinct possibilities regarding the versions running on these two instances (X→X, X→Y, Y→X, Y→Y). If in version Y you've made changes to the request in its protocol/format/payload, you'll need to deal with all 4 cases to avoid encountering errors during the deployment. If the instances log all messages with their version, it'll help track down these transient incompatibility bugs, e.g.
{
"service": "B",
"build": "X",
"request_service": "A",
"message": "unknown field in request: 'new_field'"
}
- jkharrat 4y agoDer @thamer thanks for the advice. I have added it to the article :) Much appreciated