64 references to ActivityIdFormat
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisConnectionInstrumentation.cs (1)
80if (parent == null || parent.IdFormat != ActivityIdFormat.W3C)
Microsoft.AspNetCore.Hosting.Tests (1)
HostingApplicationDiagnosticsTests.cs (1)
933Assert.Equal(ActivityIdFormat.W3C, Activity.Current.IdFormat);
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTests.Activity.cs (2)
149Assert.Equal(ActivityIdFormat.W3C, invocationActivity.IdFormat); 275Assert.Equal(ActivityIdFormat.W3C, invocationActivity.IdFormat);
Microsoft.Extensions.Logging (6)
LoggerFactoryScopeProvider.cs (6)
295ActivityIdFormat.Hierarchical => activity.Id, 296ActivityIdFormat.W3C => activity.SpanId.ToHexString(), 305ActivityIdFormat.Hierarchical => activity.RootId, 306ActivityIdFormat.W3C => activity.TraceId.ToHexString(), 315ActivityIdFormat.Hierarchical => activity.ParentId, 316ActivityIdFormat.W3C => activity.ParentSpanId.ToHexString(),
Microsoft.Extensions.Logging.EventSource (1)
EventSourceLogger.cs (1)
79if (activity != null && activity.IdFormat == ActivityIdFormat.W3C)
Microsoft.Extensions.Telemetry (6)
Logging\Import\LoggerFactoryScopeProvider.cs (6)
297ActivityIdFormat.Hierarchical => activity.Id, 298ActivityIdFormat.W3C => activity.SpanId.ToHexString(), 307ActivityIdFormat.Hierarchical => activity.RootId, 308ActivityIdFormat.W3C => activity.TraceId.ToHexString(), 317ActivityIdFormat.Hierarchical => activity.ParentId, 318ActivityIdFormat.W3C => activity.ParentSpanId.ToHexString(),
Microsoft.Extensions.Telemetry.Tests (6)
Logging\ExtendedLoggerFactoryTests.cs (6)
647ActivityIdFormat.Hierarchical => activity.Id, 648ActivityIdFormat.W3C => activity.SpanId.ToHexString(), 659ActivityIdFormat.Hierarchical => activity.RootId, 660ActivityIdFormat.W3C => activity.TraceId.ToHexString(), 671ActivityIdFormat.Hierarchical => activity.ParentId, 672ActivityIdFormat.W3C => activity.ParentSpanId.ToHexString(),
System.Diagnostics.DiagnosticSource (41)
System\Diagnostics\Activity.cs (20)
76private static ActivityIdFormat s_defaultIdFormat; 816if (IdFormat == ActivityIdFormat.Unknown) 822_parentSpanId != null ? ActivityIdFormat.W3C : 824IsW3CId(_parentId) ? ActivityIdFormat.W3C : 825ActivityIdFormat.Hierarchical; 829if (IdFormat == ActivityIdFormat.W3C) 913if (_id != null && IdFormat == ActivityIdFormat.W3C) 991else if (Parent != null && Parent.IdFormat == ActivityIdFormat.W3C) 1023public static ActivityIdFormat DefaultIdFormat 1027if (s_defaultIdFormat == ActivityIdFormat.Unknown) 1030s_defaultIdFormat = LocalAppContextSwitches.DefaultActivityIdFormatIsHierarchial ? ActivityIdFormat.Hierarchical : ActivityIdFormat.W3C; 1039if (!(ActivityIdFormat.Hierarchical <= value && value <= ActivityIdFormat.W3C)) 1049public Activity SetIdFormat(ActivityIdFormat format) 1180ActivityTagsCollection? samplerTags, ActivitySamplingResult request, bool startIt, ActivityIdFormat idFormat, string? traceState) 1361if (IdFormat == ActivityIdFormat.W3C) 1425if (Parent != null && Parent.IdFormat == ActivityIdFormat.W3C) 1497public ActivityIdFormat IdFormat 1499get => (ActivityIdFormat)(_state & State.FormatFlags);
System\Diagnostics\ActivityCreationOptions.cs (11)
28internal ActivityCreationOptions(ActivitySource source, string name, T parent, ActivityKind kind, IEnumerable<KeyValuePair<string, object?>>? tags, IEnumerable<ActivityLink>? links, ActivityIdFormat idFormat) 38if (IdFormat == ActivityIdFormat.Unknown && Activity.ForceDefaultIdFormat) 49if (IdFormat == ActivityIdFormat.Unknown) 51IdFormat = ActivityIdFormat.W3C; 58if (IdFormat != ActivityIdFormat.Hierarchical) 62IdFormat = ActivityIdFormat.W3C; 65if (IdFormat == ActivityIdFormat.Unknown) 67IdFormat = ActivityIdFormat.Hierarchical; 78if (IdFormat == ActivityIdFormat.Unknown) 133if (Parent is ActivityContext && IdFormat == ActivityIdFormat.W3C && _context == default) 164internal ActivityIdFormat IdFormat { get; }
System\Diagnostics\ActivitySource.cs (9)
125public Activity? CreateActivity(string name, ActivityKind kind, ActivityContext parentContext, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) 141public Activity? CreateActivity(string name, ActivityKind kind, string? parentId, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) 193IEnumerable<ActivityLink>? links, DateTimeOffset startTime, bool startIt = true, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) 214if (aco.IdFormat == ActivityIdFormat.W3C) 217acoContext = new ActivityCreationOptions<ActivityContext>(this, name, aco.GetContext(), kind, tags, links, ActivityIdFormat.W3C); 232else if (data.IdFormat == ActivityIdFormat.W3C)
System\Diagnostics\LegacyPropagator.cs (1)
29if (activity.IdFormat == ActivityIdFormat.W3C)