@@ -17,7 +17,7 @@ internal class ServiceBusDiagnosticSource
1717 public const string BaseActivityName = "Microsoft.Azure.ServiceBus." ;
1818
1919 public const string ExceptionEventName = BaseActivityName + "Exception" ;
20- public const string ProcessActivityName = BaseActivityName + "Process" ;
20+ public const string ProcessActivityName = BaseActivityName + "Process" ;
2121
2222 public const string ActivityIdPropertyName = "Diagnostic-Id" ;
2323 public const string CorrelationContextPropertyName = "Correlation-Context" ;
@@ -46,11 +46,11 @@ public static bool IsEnabled()
4646 internal Activity SendStart ( IList < Message > messageList )
4747 {
4848 Activity activity = Start ( "Send" , ( ) => new
49- {
50- Messages = messageList ,
51- Entity = this . entityPath ,
52- Endpoint = this . endpoint
53- } ,
49+ {
50+ Messages = messageList ,
51+ Entity = this . entityPath ,
52+ Endpoint = this . endpoint
53+ } ,
5454 a => SetTags ( a , messageList )
5555 ) ;
5656
@@ -81,11 +81,11 @@ internal void SendStop(Activity activity, IList<Message> messageList, TaskStatus
8181 internal Activity ProcessStart ( Message message )
8282 {
8383 return ProcessStart ( "Process" , message , ( ) => new
84- {
85- Message = message ,
86- Entity = this . entityPath ,
87- Endpoint = this . endpoint
88- } ,
84+ {
85+ Message = message ,
86+ Entity = this . entityPath ,
87+ Endpoint = this . endpoint
88+ } ,
8989 a => SetTags ( a , message ) ) ;
9090 }
9191
@@ -103,7 +103,7 @@ internal void ProcessStop(Activity activity, Message message, TaskStatus? status
103103 }
104104 }
105105
106- internal IEnumerable < Activity > ProcessStart ( IEnumerable < Message > messages )
106+ internal IEnumerable < Activity > ProcessStart ( IList < Message > messages )
107107 {
108108 var activities = new List < Activity > ( ) ;
109109
@@ -142,7 +142,6 @@ internal void ProcessStop(IEnumerable<Activity> activities, TaskStatus? status)
142142 }
143143 }
144144
145-
146145 #endregion
147146
148147
@@ -151,12 +150,12 @@ internal void ProcessStop(IEnumerable<Activity> activities, TaskStatus? status)
151150 internal Activity ProcessSessionStart ( IMessageSession session , Message message )
152151 {
153152 return ProcessStart ( "ProcessSession" , message , ( ) => new
154- {
155- Session = session ,
156- Message = message ,
157- Entity = this . entityPath ,
158- Endpoint = this . endpoint
159- } ,
153+ {
154+ Session = session ,
155+ Message = message ,
156+ Entity = this . entityPath ,
157+ Endpoint = this . endpoint
158+ } ,
160159 a => SetTags ( a , message ) ) ;
161160 }
162161
@@ -183,12 +182,12 @@ internal void ProcessSessionStop(Activity activity, IMessageSession session, Mes
183182 internal Activity ScheduleStart ( Message message , DateTimeOffset scheduleEnqueueTimeUtc )
184183 {
185184 Activity activity = Start ( "Schedule" , ( ) => new
186- {
187- Message = message ,
188- ScheduleEnqueueTimeUtc = scheduleEnqueueTimeUtc ,
189- Entity = this . entityPath ,
190- Endpoint = this . endpoint
191- } ,
185+ {
186+ Message = message ,
187+ ScheduleEnqueueTimeUtc = scheduleEnqueueTimeUtc ,
188+ Entity = this . entityPath ,
189+ Endpoint = this . endpoint
190+ } ,
192191 a => SetTags ( a , message ) ) ;
193192
194193 Inject ( message ) ;
@@ -580,11 +579,11 @@ internal void GetRulesStop(Activity activity, IEnumerable<RuleDescription> rules
580579 internal Activity AcceptMessageSessionStart ( string sessionId )
581580 {
582581 return Start ( "AcceptMessageSession" , ( ) => new
583- {
584- SessionId = sessionId ,
585- Entity = this . entityPath ,
586- Endpoint = this . endpoint
587- } ,
582+ {
583+ SessionId = sessionId ,
584+ Entity = this . entityPath ,
585+ Endpoint = this . endpoint
586+ } ,
588587 a => SetSessionTag ( a , sessionId )
589588 ) ;
590589 }
@@ -611,11 +610,11 @@ internal void AcceptMessageSessionStop(Activity activity, string sessionId, Task
611610 internal Activity GetSessionStateStart ( string sessionId )
612611 {
613612 return Start ( "GetSessionState" , ( ) => new
614- {
615- SessionId = sessionId ,
616- Entity = this . entityPath ,
617- Endpoint = this . endpoint
618- } ,
613+ {
614+ SessionId = sessionId ,
615+ Entity = this . entityPath ,
616+ Endpoint = this . endpoint
617+ } ,
619618 a => SetSessionTag ( a , sessionId ) ) ;
620619 }
621620
@@ -642,12 +641,12 @@ internal void GetSessionStateStop(Activity activity, string sessionId, byte[] st
642641 internal Activity SetSessionStateStart ( string sessionId , byte [ ] state )
643642 {
644643 return Start ( "SetSessionState" , ( ) => new
645- {
646- State = state ,
647- SessionId = sessionId ,
648- Entity = this . entityPath ,
649- Endpoint = this . endpoint
650- } ,
644+ {
645+ State = state ,
646+ SessionId = sessionId ,
647+ Entity = this . entityPath ,
648+ Endpoint = this . endpoint
649+ } ,
651650 a => SetSessionTag ( a , sessionId ) ) ;
652651 }
653652
@@ -769,7 +768,7 @@ private void Inject(Message message, string id, string correlationContext)
769768 }
770769 }
771770
772- private string SerializeCorrelationContext ( IList < KeyValuePair < string , string > > baggage )
771+ private string SerializeCorrelationContext ( IList < KeyValuePair < string , string > > baggage )
773772 {
774773 if ( baggage != null && baggage . Count > 0 )
775774 {
@@ -807,7 +806,7 @@ private Activity ProcessStart(string operationName, Message message, Func<object
807806 {
808807 var tmpActivity = message . ExtractActivity ( activityName ) ;
809808 setTags ? . Invoke ( tmpActivity ) ;
810-
809+
811810 if ( DiagnosticListener . IsEnabled ( activityName , entityPath , tmpActivity ) )
812811 {
813812 activity = tmpActivity ;
0 commit comments