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