@@ -149,11 +149,12 @@ public async Task SubmitsTraces()
149
149
{
150
150
const int expectedSpanCount = 21 ;
151
151
var spans = await agent . WaitForSpansAsync ( expectedSpanCount ) ;
152
+ var filteredSpans = spans . Where ( s => ! s . Resource . Equals ( "Timer ExitApp" , StringComparison . OrdinalIgnoreCase ) ) . ToImmutableList ( ) ;
152
153
153
154
using var s = new AssertionScope ( ) ;
154
- spans . Count . Should ( ) . Be ( expectedSpanCount ) ;
155
+ filteredSpans . Count . Should ( ) . Be ( expectedSpanCount ) ;
155
156
156
- await AssertInProcessSpans ( spans ) ;
157
+ await AssertInProcessSpans ( filteredSpans ) ;
157
158
}
158
159
}
159
160
}
@@ -216,10 +217,10 @@ public async Task SubmitsTraces()
216
217
{
217
218
const int expectedSpanCount = 21 ;
218
219
var spans = await agent . WaitForSpansAsync ( expectedSpanCount ) ;
219
-
220
+ var filteredSpans = spans . Where ( s => ! s . Resource . Equals ( "Timer ExitApp" , StringComparison . OrdinalIgnoreCase ) ) . ToImmutableList ( ) ;
220
221
using var s = new AssertionScope ( ) ;
221
222
222
- await AssertIsolatedSpans ( spans , $ "{ nameof ( AzureFunctionsTests ) } .Isolated.V4.Sdk1") ;
223
+ await AssertIsolatedSpans ( filteredSpans , $ "{ nameof ( AzureFunctionsTests ) } .Isolated.V4.Sdk1") ;
223
224
}
224
225
}
225
226
}
@@ -280,14 +281,15 @@ public async Task SubmitsTraces()
280
281
using var agent = EnvironmentHelper . GetMockAgent ( useTelemetry : true ) ;
281
282
using ( await RunAzureFunctionAndWaitForExit ( agent , expectedExitCode : - 1 ) )
282
283
{
283
- const int expectedSpanCount = 22 ;
284
+ const int expectedSpanCount = 21 ;
284
285
var spans = await agent . WaitForSpansAsync ( expectedSpanCount ) ;
286
+ var filteredSpans = spans . Where ( s => ! s . Resource . Equals ( "Timer ExitApp" , StringComparison . OrdinalIgnoreCase ) ) . ToImmutableList ( ) ;
285
287
286
288
using var s = new AssertionScope ( ) ;
287
289
288
- await AssertIsolatedSpans ( spans ) ;
290
+ await AssertIsolatedSpans ( filteredSpans ) ;
289
291
290
- spans . Count . Should ( ) . Be ( expectedSpanCount ) ;
292
+ filteredSpans . Count . Should ( ) . Be ( expectedSpanCount ) ;
291
293
}
292
294
}
293
295
}
0 commit comments