Join the discussion
Question 1/20
A Mule application for processing orders must log the order ID for every log message output.
What is a best practice to enrich every log message with the order ID?
What is a best practice to enrich every log message with the order ID?
Correct Answer: D
Explanation
To enrich every log message with the order ID, the developer should use the Tracing module to set logging variables with a Mapped Diagnostic Context (MDC). The Tracing module allows adding custom key-value pairs to log messages using MDC variables. The developer can use Set Logging Variables operation to set the order ID as an MDC variable and then use it in any logger processor within the same thread or event.
References: https://docs.mulesoft.com/tracing-module/1.0/tracing-module-reference#set-logging-variables
To enrich every log message with the order ID, the developer should use the Tracing module to set logging variables with a Mapped Diagnostic Context (MDC). The Tracing module allows adding custom key-value pairs to log messages using MDC variables. The developer can use Set Logging Variables operation to set the order ID as an MDC variable and then use it in any logger processor within the same thread or event.
References: https://docs.mulesoft.com/tracing-module/1.0/tracing-module-reference#set-logging-variables
Add Comments
- Other Question (20q)
- Q1. A Mule application for processing orders must log the order ID for every log message outpu...
- Q2. A Mule application need to invoice an API hosted by an external system to initiate a proce...
- Q3. Which pattern can a web API use to notify its client of state changes as soon as they occu...
- Q4. Refer to the exhibit. A Mute Object Store is configured with an entry TTL of one second an...
- Q5. Which statement is true when working with correlation IDS?...
- Q6. A Mule application deployed to a standardalone Mule runtime uses VM queues to publish mess...
- Q7. An API has been developed and deployed to CloudHub Among the policies applied to this API ...
- Q8. When implementing a synchronous API where the event source is an HTTP Listener, a develope...
- Q9. A scatter-gather router is configured with four routes:Route A, B, C and D. Route C false....
- Q10. An API has been built to enable scheduling email provider. The front-end system does very ...
- Q11. A Mule application uses API autodiscovery to access and enforce policies for a RESTful imp...
- Q12. Refer to the exhibit. What required changes can be made to give a partial successful respo...
- Q13. The Center for Enablement team published a common application as a reusable module to the ...
- Q14. Refer to the exhibit. (Exhibit) Based on the code snippet, schema,json file, and payload b...
- Q15. When a client and server are exchanging messages during the mTLS handshake, what is being ...
- Q16. A company deploys 10 public APIs to CloudHub. Each API has its individual health endpoint ...
- Q17. In a Mule project, Flow-1 contains a flow-ref to Flow-2 depends on data from Flow-1 to exe...
- Q18. Which pattern should be used to invoke multiple HTTP APIs in parallel and roll back failed...
- Q19. A Mule application includes a subflow containing a Scatter.Gather scope. Within each log o...
- Q20. Refer to the exhibits. Bioinfo System API is implemented and published to Anypoint Exchang...
