57 references to ActivitySamplingResult
Microsoft.AspNetCore.Hosting.Tests (6)
HostingApplicationDiagnosticsTests.cs (4)
185Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData 982static ActivitySamplingResult ComputeActivitySamplingResult(ref ActivityCreationOptions<ActivityContext> options) 987return ActivitySamplingResult.AllDataAndRecorded; 1028Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData,
HostingApplicationTests.cs (2)
101Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData 143Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (6)
HubConnectionTests.Tracing.cs (6)
43Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 238Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 382Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 485Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 581Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 671Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData,
Microsoft.AspNetCore.SignalR.Client.Tests (5)
HubConnectionTests.Tracing.cs (5)
30Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 67Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 105Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 139Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 177Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData,
Microsoft.AspNetCore.SignalR.Tests (8)
HubConnectionHandlerTests.Activity.cs (8)
39Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 114Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 183Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 242Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 315Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 362Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 414Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData, 465Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData,
System.Diagnostics.DiagnosticSource (32)
System\Diagnostics\Activity.cs (4)
1180ActivityTagsCollection? samplerTags, ActivitySamplingResult request, bool startIt, ActivityIdFormat idFormat, string? traceState) 1243activity.IsAllDataRequested = request == ActivitySamplingResult.AllData || request == ActivitySamplingResult.AllDataAndRecorded; 1245if (request == ActivitySamplingResult.AllDataAndRecorded)
System\Diagnostics\ActivityListener.cs (1)
11public delegate ActivitySamplingResult SampleActivity<T>(ref ActivityCreationOptions<T> options);
System\Diagnostics\ActivitySource.cs (10)
206ActivitySamplingResult samplingResult = ActivitySamplingResult.None; 220listeners.EnumWithFunc((ActivityListener listener, ref ActivityCreationOptions<string> data, ref ActivitySamplingResult result, ref ActivityCreationOptions<ActivityContext> dataWithContext) => { 224ActivitySamplingResult sr = sampleUsingParentId(ref data); 241ActivitySamplingResult sr = sample(ref dataWithContext); 290listeners.EnumWithFunc((ActivityListener listener, ref ActivityCreationOptions<ActivityContext> data, ref ActivitySamplingResult result, ref ActivityCreationOptions<ActivityContext> unused) => { 294ActivitySamplingResult dr = sample(ref data); 315if (samplingResult != ActivitySamplingResult.None) 355internal delegate void Function<T, TParent>(T item, ref ActivityCreationOptions<TParent> data, ref ActivitySamplingResult samplingResult, ref ActivityCreationOptions<ActivityContext> dataWithContext); 486public void EnumWithFunc<TParent>(ActivitySource.Function<T, TParent> func, ref ActivityCreationOptions<TParent> data, ref ActivitySamplingResult samplingResult, ref ActivityCreationOptions<ActivityContext> dataWithContext)
System\Diagnostics\DsesActivitySourceListener.cs (4)
192private ActivitySamplingResult OnSampleUsingParentId(ref ActivityCreationOptions<string> options) 199private ActivitySamplingResult OnSample(ref ActivityCreationOptions<ActivityContext> options) 204private ActivitySamplingResult OnSample( 212: ActivitySamplingResult.None;
System\Diagnostics\DsesFilterAndTransform.cs (3)
216=> ActivitySamplingResult.AllDataAndRecorded; // Default sampler 242sampleFunc = static (bool hasActivityContext, ref ActivityCreationOptions<ActivityContext> options) => ActivitySamplingResult.PropagationData; 246sampleFunc = static (bool hasActivityContext, ref ActivityCreationOptions<ActivityContext> options) => ActivitySamplingResult.AllData;
System\Diagnostics\DsesSamplerBuilder.cs (10)
6internal delegate ActivitySamplingResult DsesSampleActivityFunc( 26ActivitySamplingResult samplingDecision = ParentRatioSampler(idUpperBound, in parentContext, options.TraceId); 28return samplingDecision == ActivitySamplingResult.None 30? ActivitySamplingResult.PropagationData // If it is the root span or the parent is remote select PropagationData so the trace ID is preserved 35return ActivitySamplingResult.None; 39public static ActivitySamplingResult ParentRatioSampler(long idUpperBound, in ActivityContext parentContext, ActivityTraceId traceId) 44? ActivitySamplingResult.AllDataAndRecorded 45: ActivitySamplingResult.None; 52? ActivitySamplingResult.AllDataAndRecorded 53: ActivitySamplingResult.None;