@@ -34,7 +34,7 @@ public async Task InvokeAsync_SendTraceHeader(string protocolName, HttpTransport
34
34
{
35
35
var serverChannel = Channel . CreateUnbounded < Activity > ( ) ;
36
36
var clientChannel = Channel . CreateUnbounded < Activity > ( ) ;
37
- var serverSource = server . Services . GetRequiredService < SignalRActivitySource > ( ) . ActivitySource ;
37
+ var serverSource = server . Services . GetRequiredService < SignalRServerActivitySource > ( ) . ActivitySource ;
38
38
var clientSourceContainer = new SignalRClientActivitySource ( ) ;
39
39
40
40
using var listener = new ActivityListener
@@ -140,16 +140,18 @@ public async Task InvokeAsync_SendTraceHeader(string protocolName, HttpTransport
140
140
Assert . Collection ( serverActivities ,
141
141
a =>
142
142
{
143
- Assert . Equal ( $ "{ serverHubName } /OnConnectedAsync", a . OperationName ) ;
143
+ Assert . Equal ( SignalRServerActivitySource . OnConnected , a . OperationName ) ;
144
+ Assert . Equal ( $ "{ serverHubName } /OnConnectedAsync", a . DisplayName ) ;
144
145
Assert . Equal ( "Microsoft.AspNetCore.Hosting.HttpRequestIn" , a . Parent . OperationName ) ;
145
- Assert . Equal ( ActivityKind . Server , a . Kind ) ;
146
+ Assert . Equal ( ActivityKind . Internal , a . Kind ) ;
146
147
Assert . False ( a . HasRemoteParent ) ;
147
148
Assert . Equal ( ActivityStatusCode . Unset , a . Status ) ;
148
149
Assert . Empty ( a . Baggage ) ;
149
150
} ,
150
151
a =>
151
152
{
152
- Assert . Equal ( $ "{ serverHubName } /HelloWorld", a . OperationName ) ;
153
+ Assert . Equal ( SignalRServerActivitySource . InvocationIn , a . OperationName ) ;
154
+ Assert . Equal ( $ "{ serverHubName } /HelloWorld", a . DisplayName ) ;
153
155
Assert . Equal ( clientActivity1 . Id , a . ParentId ) ;
154
156
Assert . Equal ( ActivityKind . Server , a . Kind ) ;
155
157
Assert . True ( a . HasRemoteParent ) ;
@@ -160,7 +162,8 @@ public async Task InvokeAsync_SendTraceHeader(string protocolName, HttpTransport
160
162
} ,
161
163
a =>
162
164
{
163
- Assert . Equal ( $ "{ serverHubName } /HelloWorld", a . OperationName ) ;
165
+ Assert . Equal ( SignalRServerActivitySource . InvocationIn , a . OperationName ) ;
166
+ Assert . Equal ( $ "{ serverHubName } /HelloWorld", a . DisplayName ) ;
164
167
Assert . Equal ( clientActivity2 . Id , a . ParentId ) ;
165
168
Assert . Equal ( ActivityKind . Server , a . Kind ) ;
166
169
Assert . True ( a . HasRemoteParent ) ;
@@ -171,9 +174,10 @@ public async Task InvokeAsync_SendTraceHeader(string protocolName, HttpTransport
171
174
} ,
172
175
a =>
173
176
{
174
- Assert . Equal ( $ "{ serverHubName } /OnDisconnectedAsync", a . OperationName ) ;
177
+ Assert . Equal ( SignalRServerActivitySource . OnDisconnected , a . OperationName ) ;
178
+ Assert . Equal ( $ "{ serverHubName } /OnDisconnectedAsync", a . DisplayName ) ;
175
179
Assert . Equal ( "Microsoft.AspNetCore.Hosting.HttpRequestIn" , a . Parent . OperationName ) ;
176
- Assert . Equal ( ActivityKind . Server , a . Kind ) ;
180
+ Assert . Equal ( ActivityKind . Internal , a . Kind ) ;
177
181
Assert . False ( a . HasRemoteParent ) ;
178
182
Assert . Empty ( a . Baggage ) ;
179
183
Assert . Equal ( ActivityStatusCode . Unset , a . Status ) ;
@@ -225,7 +229,7 @@ public async Task StreamAsyncCore_SendTraceHeader(string protocolName, HttpTrans
225
229
var serverChannel = Channel . CreateUnbounded < Activity > ( ) ;
226
230
var clientActivityTcs = new TaskCompletionSource < Activity > ( ) ;
227
231
Activity clientActivity = null ;
228
- var serverSource = server . Services . GetRequiredService < SignalRActivitySource > ( ) . ActivitySource ;
232
+ var serverSource = server . Services . GetRequiredService < SignalRServerActivitySource > ( ) . ActivitySource ;
229
233
var clientSourceContainer = new SignalRClientActivitySource ( ) ;
230
234
231
235
using var listener = new ActivityListener
@@ -308,9 +312,9 @@ public async Task StreamAsyncCore_SendTraceHeader(string protocolName, HttpTrans
308
312
Assert . Collection ( serverActivities ,
309
313
a =>
310
314
{
311
- Assert . Equal ( $ " { hubName } /OnConnectedAsync" , a . OperationName ) ;
315
+ Assert . Equal ( SignalRServerActivitySource . OnConnected , a . OperationName ) ;
312
316
Assert . Equal ( $ "{ hubName } /OnConnectedAsync", a . DisplayName ) ;
313
- Assert . Equal ( ActivityKind . Server , a . Kind ) ;
317
+ Assert . Equal ( ActivityKind . Internal , a . Kind ) ;
314
318
Assert . Equal ( "Microsoft.AspNetCore.Hosting.HttpRequestIn" , a . Parent . OperationName ) ;
315
319
Assert . Equal ( ActivityStatusCode . Unset , a . Status ) ;
316
320
Assert . False ( a . HasRemoteParent ) ;
@@ -319,7 +323,7 @@ public async Task StreamAsyncCore_SendTraceHeader(string protocolName, HttpTrans
319
323
} ,
320
324
a =>
321
325
{
322
- Assert . Equal ( $ " { hubName } /Stream" , a . OperationName ) ;
326
+ Assert . Equal ( SignalRServerActivitySource . InvocationIn , a . OperationName ) ;
323
327
Assert . Equal ( $ "{ hubName } /Stream", a . DisplayName ) ;
324
328
Assert . Equal ( ActivityKind . Server , a . Kind ) ;
325
329
Assert . Equal ( clientActivity . Id , a . ParentId ) ;
@@ -332,9 +336,9 @@ public async Task StreamAsyncCore_SendTraceHeader(string protocolName, HttpTrans
332
336
} ,
333
337
a =>
334
338
{
335
- Assert . Equal ( $ " { hubName } /OnDisconnectedAsync" , a . OperationName ) ;
339
+ Assert . Equal ( SignalRServerActivitySource . OnDisconnected , a . OperationName ) ;
336
340
Assert . Equal ( $ "{ hubName } /OnDisconnectedAsync", a . DisplayName ) ;
337
- Assert . Equal ( ActivityKind . Server , a . Kind ) ;
341
+ Assert . Equal ( ActivityKind . Internal , a . Kind ) ;
338
342
Assert . Equal ( "Microsoft.AspNetCore.Hosting.HttpRequestIn" , a . Parent . OperationName ) ;
339
343
Assert . Equal ( ActivityStatusCode . Unset , a . Status ) ;
340
344
Assert . False ( a . HasRemoteParent ) ;
@@ -371,7 +375,7 @@ public async Task StreamAsyncCanBeCanceled_Tracing(string protocolName, HttpTran
371
375
{
372
376
var serverChannel = Channel . CreateUnbounded < Activity > ( ) ;
373
377
var clientActivityTcs = new TaskCompletionSource < Activity > ( ) ;
374
- var serverSource = server . Services . GetRequiredService < SignalRActivitySource > ( ) . ActivitySource ;
378
+ var serverSource = server . Services . GetRequiredService < SignalRServerActivitySource > ( ) . ActivitySource ;
375
379
var clientSourceContainer = new SignalRClientActivitySource ( ) ;
376
380
377
381
using var listener = new ActivityListener
@@ -447,7 +451,7 @@ await Assert.ThrowsAsync<TaskCanceledException>(async () =>
447
451
var tags = clientActivity . TagObjects . ToDictionary ( ) ;
448
452
Assert . Equal ( typeof ( OperationCanceledException ) . FullName , tags [ "error.type" ] ) ;
449
453
} ,
450
- a => Assert . Equal ( $ "{ hubName } /OnDisconnectedAsync", a . OperationName ) ) ;
454
+ a => Assert . Equal ( $ "{ hubName } /OnDisconnectedAsync", a . DisplayName ) ) ;
451
455
452
456
Assert . Equal ( $ "{ clientHubName } /Stream", clientActivity . DisplayName ) ;
453
457
Assert . Equal ( ActivityKind . Client , clientActivity . Kind ) ;
@@ -474,7 +478,7 @@ bool ExpectedErrors(WriteContext writeContext)
474
478
{
475
479
var serverChannel = Channel . CreateUnbounded < Activity > ( ) ;
476
480
var clientActivityTcs = new TaskCompletionSource < Activity > ( ) ;
477
- var serverSource = server . Services . GetRequiredService < SignalRActivitySource > ( ) . ActivitySource ;
481
+ var serverSource = server . Services . GetRequiredService < SignalRServerActivitySource > ( ) . ActivitySource ;
478
482
var clientSourceContainer = new SignalRClientActivitySource ( ) ;
479
483
480
484
using var listener = new ActivityListener
@@ -570,7 +574,7 @@ bool ExpectedErrors(WriteContext writeContext)
570
574
{
571
575
var serverChannel = Channel . CreateUnbounded < Activity > ( ) ;
572
576
var clientActivityTcs = new TaskCompletionSource < Activity > ( ) ;
573
- var serverSource = server . Services . GetRequiredService < SignalRActivitySource > ( ) . ActivitySource ;
577
+ var serverSource = server . Services . GetRequiredService < SignalRServerActivitySource > ( ) . ActivitySource ;
574
578
var clientSourceContainer = new SignalRClientActivitySource ( ) ;
575
579
576
580
using var listener = new ActivityListener
@@ -660,7 +664,7 @@ public async Task SendAsync_Tracing(string protocolName, HttpTransportType trans
660
664
{
661
665
var serverChannel = Channel . CreateUnbounded < Activity > ( ) ;
662
666
var clientActivityTcs = new TaskCompletionSource < Activity > ( ) ;
663
- var serverSource = server . Services . GetRequiredService < SignalRActivitySource > ( ) . ActivitySource ;
667
+ var serverSource = server . Services . GetRequiredService < SignalRServerActivitySource > ( ) . ActivitySource ;
664
668
var clientSourceContainer = new SignalRClientActivitySource ( ) ;
665
669
666
670
using var listener = new ActivityListener
0 commit comments