BCDA-7415: add transaction id to middleware for all routers #165
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.
🎫 Ticket
https://jira.cms.gov/browse/BCDA-7415
🛠 Changes
SetCtxEntry
was not returning ctx with new log fields; updated now to do soℹ️ Context for reviewers
Other work in 7415 involves a 'TrackingID' that is generated either as bytes or as a UUID. The TrackingID is meant to correlate log messages; the transaction ID configuration in BCDA app is the agreed upon implementation for correlating logs. For the sake of consistency and for correlating logs for requests as soon as they come in and complete, this has been updated.
✅ Acceptance Validation
Tests are present in other file that will be in a future PR; changes are tightly coupled and to keep this PR small, validation was done locally. Here are the logs for a POST request to the group endpoint:
🔒 Security Implications
If any security implications apply, add Jason Ashbaugh (GitHub username: StewGoin) as a reviewer and do not merge this PR without his approval.