Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After discussion with architects, it was realized this has not fully materialized. Instead of modifying existing NDC code-base, it was suggested that we use MDC (aka hash) model and pass the same logContextID, up to the resource layer.

Using MDC has additional advantage that, being a hash, one can put additional

References

...

  • Being a key, value pair object, easier to manipulate
  • More extensible than NDC stack to add more info in future if neededas needed for better analysis(resource id, management server id, agent id and host id from agents etc.)
Constraints Imposed
  • MDC is designed to be lightweight, hence the context hashmap will only contain String (key,value) pairs
  • Note that MDC is not a mechanism to pass information other than logContextID method parameters between methods / threads. The implementation should not be used to pass information parameters either, and no guarantees will be made about consistency if any more data is added to the MDC
  • MDC design assumes inserts / deletes to MDC are not high frequency, and we need to respect this design

...