-
Notifications
You must be signed in to change notification settings - Fork 633
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
TraceabilityHandler not being logged? #234
Comments
@ddobrin @ChenYan71 @NicholasAzar We are not putting the traceabilityId into the MDC which make it an extra column in the log file like correlationId. There are two reasons:
I am thinking to put the CorrelationIdHandler in front of this one in the middleware chain and put a logging statement in the handlerRequest method. In this case, users can search the traceabilityId and find out the correlationId in the same log statement to perform a secondary lookup with correlationId. What do you think? |
Ideally we wish to have it in all requests, to allow for the premise of true tracing across invocations. In the APIs build for my current project: Can be added to MDC or not after the spec has been validated. |
For some organizations, it is OK to enforce it, but it would be very hard to ask every client to pass in the traceabilityId. In your case, it makes sense to move validator in front of the traceabilityId and correlationId. In the case that traceabilityId is optional, do you think move correlationId before it and log traceabilityId and correlationId together is a good idea? |
For the case where it is left optional, this is an idea to "bring them together" so to say. I am thinking also about an additional ID which would fall also in this bucket, as an example: APIs which have a transactionID generated in their handlers. They log the id and the timestamp when it was issued. Maybe one suggestion would be:
|
Hi Steve,
I just had a question about the differences between the correlation handler and the traceability handler. I understand differences in the code where correlation takes from the request and adds to mdc, while traceability takes from request and adds to response. But i dont understand what the use case for traceability handler is...
I already read this doc: https://doc.networknt.com/concern/traceability/
is it suppose logged anywhere else in the chain? where would that happen?
The text was updated successfully, but these errors were encountered: