Request logging
One key aspect is the detection of problematic requests in a high load scenario and the ability to reproduce the issues the consumer is facing with the same parameters.
The easiest way to add logging of such requests to your service is to use the request logger:
using Funq; using ServiceStack; public override void Configure(Container container) { this.Plugins.Add(new RequestLogsFeature()); }
You can further customize the log entries by adapting the following properties of the RequestLogsFeature
object:
AtRestPath
(default:/requestlogs
): The route that exposes the gathered logs.EnableSessionTracking
(default:false
): If set totrue
, the request's associatedServiceStack.Auth.IAuthSession
instance is added to theSession
property of the log entries.EnableRequestBodyTracking
(default:false
): It adds the raw request body to theRequestBody
property of log entries to verify deserialization or to get insight into the raw request stream.EnableResponseTracking
(default:false...