As USACE/cwms-data-api#1666
and opendcs/opendcs#1845
Support created at session start or using provided Trace ID UUID value.
This value needs to propagate into any thread used to process the specific request. It should also propagate to external HTTP requests as X-Trace-Id is a defacto standard. This should especially be passed along to any internal systems like CDA.
NOTE: it should not directly propagate to messages, as the purpose of messages is to decouple things.
NOTE: primary need is user requests; however, such a tool is also useful to match general system operations.
Suggested implementation:
- If provided, and valid, use it
- If provided, and invalid, fail quickly
- If not provided generated at session start (excluding login, this let's us trace the whole sequence) and return to user, but keep in session object if any.
- On error, return as the "incident identifier" so we can correlate things between logs.
OpenDCS and CDA implementation look in the current request session data and use if already provided.
As USACE/cwms-data-api#1666
and opendcs/opendcs#1845
Support created at session start or using provided Trace ID UUID value.
This value needs to propagate into any thread used to process the specific request. It should also propagate to external HTTP requests as X-Trace-Id is a defacto standard. This should especially be passed along to any internal systems like CDA.
NOTE: it should not directly propagate to messages, as the purpose of messages is to decouple things.
NOTE: primary need is user requests; however, such a tool is also useful to match general system operations.
Suggested implementation:
OpenDCS and CDA implementation look in the current request session data and use if already provided.