NHSDigital / terraform-aws-mesh-client

Reference implementation of a MESH Client in an AWS environment only using serverless technologies.
MIT License
1 stars 1 forks source link

KeyError logging MESHMBOX0006 #120

Closed bob-walker-nhs closed 6 months ago

bob-walker-nhs commented 7 months ago

We see logs like this in Splunk Cloud:

13/03/2024 14:51:55.178 Log_Level=INFO Process=list-recon-preprod-mesh-fetch-message-chunk internalID=20240313145151643530_297F8A logReference=MESHMBOX0006 - Acknowledging message_id='{message_id}' http_status='{http_status}' - No substitution due to KeyError, missing keys: ['http_status'], dictionary of {'message_id': '20240313145122009567_4818F3', 'internalID': 'NotProvided', 'sessionid': 'NotProvided'}

Because the definition of MESHMBOX0006 in src/cloudlogbase.cfg has an http_status placeholder, but the logger is not providing it.

Suspect this is not an issue for most people, but is a distracting noise when tracing with Splunk. I think it will be simplest/easiest to just remove the http_status from the log template.

I will submit a PR.