public static T WithTracingId <T>(this T message) where T : IMessageWithTracingId
 {
     if (ServiceConnectionContainerScope.EnableMessageLog || ClientConnectionScope.IsDiagnosticClient)
     {
         var id = MessageWithTracingIdHelper.Generate(ClientConnectionScope.IsDiagnosticClient);
         message.TracingId = id;
     }
     return(message);
 }
Example #2
0
 private void AddTracingId(RestApiEndpoint api)
 {
     var id = MessageWithTracingIdHelper.Generate();
     if (api.Query == null)
     {
         api.Query = new Dictionary<string, StringValues>();
     }
     api.Query.Add(Constants.Headers.AsrsMessageTracingId, id.ToString());
 }