<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="5.0.0-rc.1.20451.14" />

ActivityEvent

public struct ActivityEvent
using System.Collections.Generic; using System.Runtime.CompilerServices; namespace System.Diagnostics { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] public readonly struct ActivityEvent { private static readonly ActivityTagsCollection s_emptyTags = new ActivityTagsCollection(); public string Name { get; } public DateTimeOffset Timestamp { get; } [System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0, 1, 1 })] public IEnumerable<KeyValuePair<string, object>> Tags { [return: System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0, 1, 1 })] get; } public ActivityEvent(string name) { this = new ActivityEvent(name, DateTimeOffset.UtcNow, s_emptyTags); } public ActivityEvent(string name, DateTimeOffset timestamp = default(DateTimeOffset), [System.Runtime.CompilerServices.Nullable(2)] ActivityTagsCollection tags = null) { Name = (name ?? string.Empty); Tags = (tags ?? s_emptyTags); Timestamp = ((timestamp != default(DateTimeOffset)) ? timestamp : DateTimeOffset.UtcNow); } } }