Class TestActivityEntry
- Namespace
- XBullet.EasyTesting.Observability
- Assembly
- XBullet.EasyTesting.Observability.dll
One completed activity captured from an integration-test process.
public sealed class TestActivityEntry
- Inheritance
-
TestActivityEntry
- Inherited Members
Constructors
TestActivityEntry(string, string, string, ActivityKind, ActivityStatusCode, string?, ActivityTraceId, ActivitySpanId, ActivitySpanId, DateTimeOffset, TimeSpan, IReadOnlyDictionary<string, object?>, IReadOnlyDictionary<string, string?>, IReadOnlyList<TestActivityEvent>)
Creates an immutable captured activity entry.
public TestActivityEntry(string sourceName, string operationName, string displayName, ActivityKind kind, ActivityStatusCode status, string? statusDescription, ActivityTraceId traceId, ActivitySpanId spanId, ActivitySpanId parentSpanId, DateTimeOffset startTime, TimeSpan duration, IReadOnlyDictionary<string, object?> tags, IReadOnlyDictionary<string, string?> baggage, IReadOnlyList<TestActivityEvent> events)
Parameters
sourceNamestringThe activity source name.
operationNamestringThe activity operation name.
displayNamestringThe activity display name.
kindActivityKindThe activity kind describing the span's role.
statusActivityStatusCodeThe completion status code.
statusDescriptionstringThe optional status description, or null when absent.
traceIdActivityTraceIdThe W3C trace identifier.
spanIdActivitySpanIdThe W3C span identifier.
parentSpanIdActivitySpanIdThe parent span identifier, or its default value for a root activity.
startTimeDateTimeOffsetThe absolute UTC start instant reported by the activity.
durationTimeSpanThe elapsed activity duration.
tagsIReadOnlyDictionary<string, object>The activity tags. The dictionary is retained without copying and can contain sensitive or mutable values; callers should not mutate it after construction.
baggageIReadOnlyDictionary<string, string>The activity baggage. The dictionary is retained without copying and can contain sensitive values; callers should not mutate it after construction.
eventsIReadOnlyList<TestActivityEvent>The activity events in recorded order. The list is retained without copying and should not be mutated after construction.
Properties
Baggage
Gets a stable copy of the activity baggage.
public IReadOnlyDictionary<string, string?> Baggage { get; }
Property Value
- IReadOnlyDictionary<string, string>
The retained read-only baggage dictionary. Values are not redacted and may be sensitive.
DisplayName
Gets the display name.
public string DisplayName { get; }
Property Value
- string
The display name captured at completion.
Duration
Gets the completed activity duration.
public TimeSpan Duration { get; }
Property Value
- TimeSpan
The elapsed time from activity start through stop.
Events
Gets a stable copy of the activity events.
public IReadOnlyList<TestActivityEvent> Events { get; }
Property Value
- IReadOnlyList<TestActivityEvent>
The retained event list in recording order. Event tag values are not redacted.
Kind
Gets the activity kind.
public ActivityKind Kind { get; }
Property Value
- ActivityKind
The span role reported by ActivityKind.
OperationName
Gets the operation name.
public string OperationName { get; }
Property Value
- string
The operation name captured at completion.
ParentSpanId
Gets the parent span identifier.
public ActivitySpanId ParentSpanId { get; }
Property Value
- ActivitySpanId
The parent span identifier, or its default value when the activity has no parent.
SourceName
Gets the activity source name.
public string SourceName { get; }
Property Value
- string
The source name captured at completion.
SpanId
Gets the span identifier.
public ActivitySpanId SpanId { get; }
Property Value
- ActivitySpanId
The W3C span identifier.
StartTime
Gets the activity start time.
public DateTimeOffset StartTime { get; }
Property Value
- DateTimeOffset
The absolute UTC instant at which the activity started.
Status
Gets the activity status.
public ActivityStatusCode Status { get; }
Property Value
- ActivityStatusCode
The completion status reported by the activity.
StatusDescription
Gets the activity status description.
public string? StatusDescription { get; }
Property Value
Tags
Gets a stable copy of the activity tags.
public IReadOnlyDictionary<string, object?> Tags { get; }
Property Value
- IReadOnlyDictionary<string, object>
The retained read-only tag dictionary. Values are not deep-cloned or redacted and may be sensitive or mutable.
TraceId
Gets the trace identifier.
public ActivityTraceId TraceId { get; }
Property Value
- ActivityTraceId
The W3C trace identifier.