139 references to ActivityTrackingOptions
Microsoft.AspNetCore (6)
WebApplicationBuilder.cs (3)
322ActivityTrackingOptions.SpanId | 323ActivityTrackingOptions.TraceId | 324ActivityTrackingOptions.ParentId;
WebHost.cs (3)
198options.ActivityTrackingOptions = ActivityTrackingOptions.SpanId 199| ActivityTrackingOptions.TraceId 200| ActivityTrackingOptions.ParentId;
Microsoft.Extensions.Hosting (3)
HostingHostBuilderExtensions.cs (3)
313ActivityTrackingOptions.SpanId | 314ActivityTrackingOptions.TraceId | 315ActivityTrackingOptions.ParentId;
Microsoft.Extensions.Logging (21)
LoggerFactory.cs (8)
87const ActivityTrackingOptions ActivityTrackingOptionsMask = ~(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceId | ActivityTrackingOptions.ParentId | 88ActivityTrackingOptions.TraceFlags | ActivityTrackingOptions.TraceState | ActivityTrackingOptions.Tags 89| ActivityTrackingOptions.Baggage);
LoggerFactoryOptions.cs (1)
22public ActivityTrackingOptions ActivityTrackingOptions { get; set; }
LoggerFactoryScopeProvider.cs (12)
19private readonly ActivityTrackingOptions _activityTrackingOption; 21public LoggerFactoryScopeProvider(ActivityTrackingOptions activityTrackingOption) => _activityTrackingOption = activityTrackingOption; 35if (_activityTrackingOption != ActivityTrackingOptions.None) 52if ((_activityTrackingOption & ActivityTrackingOptions.Tags) != 0 60if ((_activityTrackingOption & ActivityTrackingOptions.Baggage) != 0) 137public ActivityLogScope(Activity activity, ActivityTrackingOptions activityTrackingOption) 140Debug.Assert(activityTrackingOption != ActivityTrackingOptions.None); 143if ((activityTrackingOption & ActivityTrackingOptions.SpanId) != 0) 148if ((activityTrackingOption & ActivityTrackingOptions.TraceId) != 0) 153if ((activityTrackingOption & ActivityTrackingOptions.ParentId) != 0) 158if ((activityTrackingOption & ActivityTrackingOptions.TraceState) != 0) 163if ((activityTrackingOption & ActivityTrackingOptions.TraceFlags) != 0)
Microsoft.Extensions.Telemetry (19)
Logging\ExtendedLoggerFactory.cs (8)
49const ActivityTrackingOptions ActivityTrackingOptionsMask = ~(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceId | ActivityTrackingOptions.ParentId | 50ActivityTrackingOptions.TraceFlags | ActivityTrackingOptions.TraceState | ActivityTrackingOptions.Tags 51| ActivityTrackingOptions.Baggage);
Logging\Import\LoggerFactoryScopeProvider.cs (11)
38private readonly ActivityTrackingOptions _activityTrackingOption; 40public LoggerFactoryScopeProvider(ActivityTrackingOptions activityTrackingOption) => _activityTrackingOption = activityTrackingOption; 54if (_activityTrackingOption != ActivityTrackingOptions.None) 71if ((_activityTrackingOption & ActivityTrackingOptions.Tags) != 0 79if ((_activityTrackingOption & ActivityTrackingOptions.Baggage) != 0) 156public ActivityLogScope(Activity activity, ActivityTrackingOptions activityTrackingOption) 159if ((activityTrackingOption & ActivityTrackingOptions.SpanId) != 0) 164if ((activityTrackingOption & ActivityTrackingOptions.TraceId) != 0) 169if ((activityTrackingOption & ActivityTrackingOptions.ParentId) != 0) 174if ((activityTrackingOption & ActivityTrackingOptions.TraceState) != 0) 179if ((activityTrackingOption & ActivityTrackingOptions.TraceFlags) != 0)
Microsoft.Extensions.Telemetry.Tests (90)
Logging\ExtendedLoggerFactoryTests.cs (90)
126private static string GetActivityLogString(ActivityTrackingOptions options) 135if ((options & ActivityTrackingOptions.SpanId) != 0) 140if ((options & ActivityTrackingOptions.TraceId) != 0) 145if ((options & ActivityTrackingOptions.ParentId) != 0) 150if ((options & ActivityTrackingOptions.TraceState) != 0) 155if ((options & ActivityTrackingOptions.TraceFlags) != 0) 164[InlineData(ActivityTrackingOptions.SpanId)] 165[InlineData(ActivityTrackingOptions.TraceId)] 166[InlineData(ActivityTrackingOptions.ParentId)] 167[InlineData(ActivityTrackingOptions.TraceState)] 168[InlineData(ActivityTrackingOptions.TraceFlags)] 169[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceId)] 170[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.ParentId)] 171[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceState)] 172[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceFlags)] 173[InlineData(ActivityTrackingOptions.TraceId | ActivityTrackingOptions.ParentId)] 174[InlineData(ActivityTrackingOptions.TraceId | ActivityTrackingOptions.TraceState)] 175[InlineData(ActivityTrackingOptions.TraceId | ActivityTrackingOptions.TraceFlags)] 176[InlineData(ActivityTrackingOptions.ParentId | ActivityTrackingOptions.TraceState)] 177[InlineData(ActivityTrackingOptions.ParentId | ActivityTrackingOptions.TraceFlags)] 178[InlineData(ActivityTrackingOptions.TraceState | ActivityTrackingOptions.TraceFlags)] 179[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceId | ActivityTrackingOptions.ParentId)] 180[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceId | ActivityTrackingOptions.TraceState)] 181[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceId | ActivityTrackingOptions.TraceFlags)] 182[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.ParentId | ActivityTrackingOptions.TraceState)] 183[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.ParentId | ActivityTrackingOptions.TraceFlags)] 184[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceState | ActivityTrackingOptions.TraceFlags)] 185[InlineData(ActivityTrackingOptions.TraceId | ActivityTrackingOptions.ParentId | ActivityTrackingOptions.TraceState)] 186[InlineData(ActivityTrackingOptions.TraceId | ActivityTrackingOptions.ParentId | ActivityTrackingOptions.TraceFlags)] 187[InlineData(ActivityTrackingOptions.TraceId | ActivityTrackingOptions.TraceState | ActivityTrackingOptions.TraceFlags)] 188[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceId | ActivityTrackingOptions.ParentId | ActivityTrackingOptions.TraceState)] 189[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceId | ActivityTrackingOptions.ParentId | ActivityTrackingOptions.TraceFlags)] 190[InlineData(ActivityTrackingOptions.TraceId | ActivityTrackingOptions.ParentId | ActivityTrackingOptions.TraceState | ActivityTrackingOptions.TraceFlags)] 191[InlineData(ActivityTrackingOptions.SpanId | ActivityTrackingOptions.TraceId | ActivityTrackingOptions.ParentId | ActivityTrackingOptions.TraceState | ActivityTrackingOptions.TraceFlags)] 192public static void TestActivityIds(ActivityTrackingOptions options) 238Utils.CreateLoggerFactory(builder => { builder.Configure(o => o.ActivityTrackingOptions = (ActivityTrackingOptions)0xFF00); })); 249.Configure(o => o.ActivityTrackingOptions = ActivityTrackingOptions.Baggage) 282.Configure(o => o.ActivityTrackingOptions = ActivityTrackingOptions.TraceId | ActivityTrackingOptions.Tags) 311.Configure(o => o.ActivityTrackingOptions = ActivityTrackingOptions.TraceId | ActivityTrackingOptions.Baggage | ActivityTrackingOptions.Tags) 322string traceIdActivityLogString = GetActivityLogString(ActivityTrackingOptions.TraceId); 339.Configure(o => o.ActivityTrackingOptions = ActivityTrackingOptions.Baggage | ActivityTrackingOptions.Tags) 413.Configure(o => o.ActivityTrackingOptions = ActivityTrackingOptions.TraceId | ActivityTrackingOptions.Baggage | ActivityTrackingOptions.Tags) 422string traceIdActivityLogString = GetActivityLogString(ActivityTrackingOptions.TraceId);