private static void SetMessageTags(this DiagnosticScope scope, IEnumerable <ServiceBusMessage> messages) { var messageIds = messages.Where(m => m.MessageId != null).Select(m => m.MessageId).ToArray(); var sessionIds = messages.Where(m => m.SessionId != null).Select(m => m.SessionId).Distinct().ToArray(); scope.SetMessageTags(messageIds, sessionIds); }
public static void SetMessageTags(this DiagnosticScope scope, IEnumerable <ServiceBusReceivedMessage> messages) { // set the message Ids on the scope var messageIds = messages.Where(m => m.MessageId != null).Select(m => m.MessageId).ToArray(); var sessionIds = messages.Where(m => m.SessionId != null).Select(m => m.SessionId).Distinct().ToArray(); scope.SetMessageTags(messageIds, sessionIds); }
public static void SetMessageData(this DiagnosticScope scope, IEnumerable <ServiceBusMessage> messages) { scope.AddLinkedDiagnostics(messages); scope.SetMessageTags(messages); }