As an en engineer of ReportStream,
I want all log messages to be enriched with metadata,
so that I can more easily debug issues when going through the logs.
Description/Use Case
By wrapping each azure function's .doWork method with withContext, we can enrich each log message with relevant metadata. See FHIRTranslator for example:
val contextMap = mapOf(
MDCUtils.MDCProperty.ACTION_NAME to actionHistory.action.actionName.name,
MDCUtils.MDCProperty.REPORT_ID to message.reportId,
MDCUtils.MDCProperty.TOPIC to message.topic,
MDCUtils.MDCProperty.BLOB_URL to message.blobURL
)
withLoggingContext(contextMap) {
... // any log message here will be enriched with the properties defined in the contextMap
}
Dev Notes
There are a lot of Azure functions. Prioritize the Universal Pipeline Functions. Others will have to be evaluated to see which ones would benefit from withLoggingContext.
Acceptance Criteria
[ ] All relevant Azure Functions updated with relevant withLoggingContext
User Story
As an en engineer of ReportStream, I want all log messages to be enriched with metadata, so that I can more easily debug issues when going through the logs.
Description/Use Case
By wrapping each azure function's
.doWork
method with withContext, we can enrich each log message with relevant metadata. SeeFHIRTranslator
for example:Dev Notes
There are a lot of Azure functions. Prioritize the Universal Pipeline Functions. Others will have to be evaluated to see which ones would benefit from withLoggingContext.
Acceptance Criteria