@@ -19,6 +19,7 @@ namespace UnitTests.General
1919 /// Failing test demonstrating missing activation tracing spans.
2020 /// Expects an activation Activity to be created on first grain activation.
2121 /// </summary>
22+ [ Collection ( "ActivationTracing" ) ]
2223 public class ActivationTracingTests : OrleansTestingBase , IClassFixture < ActivationTracingTests . Fixture >
2324 {
2425 private static string ActivationSourceName = ActivitySources . RuntimeActivitySourceName ;
@@ -82,8 +83,8 @@ public async Task ActivationSpanIsCreatedOnFirstCall()
8283 {
8384 Started . Clear ( ) ;
8485
85- using var parent = new Activity ( "test-parent" ) ;
86- parent . Start ( ) ;
86+ using var parent = ActivitySources . ApplicationGrainSource . StartActivity ( "test-parent" ) ;
87+ parent ? . Start ( ) ;
8788 try
8889 {
8990 var grain = _fixture . GrainFactory . GetGrain < IFilteredActivityGrain > ( Random . Shared . Next ( ) ) ;
@@ -158,8 +159,8 @@ public async Task PersistentStateReadSpanIsCreatedDuringActivation()
158159 {
159160 Started . Clear ( ) ;
160161
161- using var parent = new Activity ( "test-parent-storage" ) ;
162- parent . Start ( ) ;
162+ using var parent = ActivitySources . ApplicationGrainSource . StartActivity ( "test-parent-storage" ) ;
163+ parent ? . Start ( ) ;
163164 try
164165 {
165166 var grain = _fixture . GrainFactory . GetGrain < IPersistentStateActivityGrain > ( Random . Shared . Next ( ) ) ;
@@ -228,8 +229,8 @@ public async Task MigrationSpansAreCreatedDuringGrainMigration()
228229 // Clear activities before migration to isolate migration spans
229230 Started . Clear ( ) ;
230231
231- parent = new Activity ( "test-parent-migration" ) ;
232- parent . Start ( ) ;
232+ parent = ActivitySources . ApplicationGrainSource . StartActivity ( "test-parent-migration" ) ;
233+ parent ? . Start ( ) ;
233234
234235 // Trigger migration with a placement hint to coerce the placement director to use the target silo
235236 RequestContext . Set ( IPlacementDirector . PlacementHintKey , targetHost ) ;
@@ -285,8 +286,8 @@ public async Task MigrationSpansAreCreatedForGrainWithPersistentState()
285286 {
286287 Started . Clear ( ) ;
287288
288- using var parent = new Activity ( "test-parent-migration-persistent" ) ;
289- parent . Start ( ) ;
289+ using var parent = ActivitySources . ApplicationGrainSource . StartActivity ( "test-parent-migration-persistent" ) ;
290+ parent ? . Start ( ) ;
290291 try
291292 {
292293 // Create a grain with persistent state and set some state
@@ -520,7 +521,7 @@ public Task<ActivityData> GetActivityId()
520521
521522 #endregion
522523
523- #region Test Grain with Persistent State for Tracing
524+ #region Test Grain with Persistent State for tracing
524525
525526 /// <summary>
526527 /// Test grain interface with persistent state for tracing tests.
0 commit comments