File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
ClassLibraries/Macross.OpenTelemetry.Extensions/Test Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,16 @@ public void ActivitySampledWithRegistration()
7474
7575 activity . Stop ( ) ;
7676
77+ Activity ? activity2 = _ActivitySource . StartActivity ( "Test" , ActivityKind . Server ) ;
78+ /* Note: This could be a bug in OpenTelemetry. If root sampler
79+ is AlwaysOffSampler then StartActivity returns null. But if
80+ AlwaysOffSampler is used as an inner sampler, it creates
81+ propagation-only spans. */
82+ Assert . IsNotNull ( activity2 ) ;
83+ Assert . IsFalse ( activity2 . IsAllDataRequested ) ;
84+ Assert . IsFalse ( activity2 . Recorded ) ;
85+
86+ Assert . AreEqual ( 1 , registration . CompletedActivities . Count ) ;
7787 Assert . IsTrue ( registration . CompletedActivities . Contains ( activity ) ) ;
7888 }
7989
You can’t perform that action at this time.
0 commit comments