[AST-494] request-id distributed logging interceptor#88
Conversation
| public static final Set<String> HEADER_PREFIXES_TO_BE_PROPAGATED = | ||
| Set.of( | ||
| TENANT_ID_HEADER_KEY, | ||
| CONTEXT_ID_HEADER_KEY, |
There was a problem hiding this comment.
What's context ID and how does it differ from request ID?
There was a problem hiding this comment.
context id will be kept same for all requests for a particular context i.e scan context. Depends on the individual client what they want to use as context-id. For our use case we will use scanId as context-id so that we can tail all the logs for a particular scan. We kept it different from request-id so that we can differentiate between multiple requests.
There was a problem hiding this comment.
I think that's certainly valuable, but this feels very individual use case driven and not the right approach at this library level. Instead, try to do something like a context prefix - allow propagating context data that can be customized at the service level. For example, one task might put a task id on for context, then the entity service might put an entity id. Because these contexts might interact and be decoupled, using a single magic key will lead to conflicts.
No description provided.