diff --git a/Services/Common/src/Controllers/ServiceBaseController.cs b/Services/Common/src/Controllers/ServiceBaseController.cs index 21bc9f1c..373d6bfd 100644 --- a/Services/Common/src/Controllers/ServiceBaseController.cs +++ b/Services/Common/src/Controllers/ServiceBaseController.cs @@ -111,9 +111,16 @@ public ServiceBaseController( [Authorize] protected async Task> PharmanetRequest() { + Logger.LogInformation(this.logger, $"ServiceBaseController.PharmanetRequest start"); + ClaimsPrincipal? user = this.HttpContext!.User; + var traceId = this.Request.Headers.TryGetValue("X-Amzn-Trace-Id", out var value) ? value.SingleOrDefault() : null; + Logger.LogInformation(this.logger, $"ServiceBaseController.PharmanetRequest: X-Amzn-Trace-Id header: {traceId}"); + string jsonString = await this.Request.GetRawBodyStringAsync().ConfigureAwait(true); + Logger.LogInformation(this.logger, $"ServiceBaseController.PharmanetRequest got the body from the request"); + DocumentReference fhirRequest; Message hl7v2Message; try @@ -155,6 +162,7 @@ protected async Task> PharmanetRequest() FhirJsonSerializer serializer = new FhirJsonSerializer(new SerializerSettings() { Pretty = true }); + Logger.LogInformation(this.logger, $"ServiceBaseController.PharmanetRequest: X-Amzn-Trace-Id header: {traceId} end"); return new ContentResult() { Content = serializer.SerializeToString(docRef),