bcgov / bcgov/SIMS

SIMS API Request Correlation ID Log

Open
#6,548 0 comments 0 reactions 1 assignee Claimed by @uhelm View on GitHub
Dominant language
TypeScript
Stars
29
Forks
15
PR merge metrics
No merged PRs in 30d

Description

As a technical person investigating logs for troubleshooting, it is challenging to create a timeline of events for user requests without having some information to connect them. A correlation ID is a known practice where an ID (e.g., guid) is created and can be associated with a series of logs, making it easier to establish a connection.

**Acceptance criteria**
- [ ] Allow SIMS API to generate a unique correlation ID for the request scope.
- [ ] Enable the correlation ID to be accessible across controllers and API related services.
- [ ] Add the correlation ID to all API logs where possible.
- [ ] Consider the possibility of having a middleware set the information into a service that would act as a "storage" to keep the information available for any service, for instance, the logger service.
- [ ] The information can go beyond the correction ID; for instance, the user IP address and user guid can also be available.
- [ ] If a common logger will be consuming the information, consider that it will be available only from the API calls for now.
- [ ] Review NestJS recommendations and common approaches to have the correlation ID available.
- [ ] Review with the Team before starting the effort on possible strategies.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.