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