Class ProtoTraceOptions

Namespace
ProtoTest.Core
Assembly
ProtoTest.Core.dll

Options for the automatic execution trace: whether it is collected, where it is written and what travels with it. Code values are the only source; ConfigureTracing supplies them.

public sealed class ProtoTraceOptions
Inheritance
ProtoTraceOptions
Inherited Members
Extension Methods

Properties

ActivitySources

Names of activity sources whose spans are captured into the trace, such as an application's own instrumentation or any OpenTelemetry-aware library. Nothing ProtoTest-specific is required of them.

public IList<string> ActivitySources { get; }

Property Value

IList<string>

CaptureSourceLocations

Records where in the suite's code each operation started (code.file.path, code.line.number, code.function.name), read from the stack and the suite's symbols. On by default.

public bool CaptureSourceLocations { get; set; }

Property Value

bool

EmbedArtifacts

Embeds attachment content in the archive. Turn it off for a size- or privacy-conscious run: the attachment is still declared (name, media type, size) but its content is neither read nor written, and the artifact carries an error saying embedding is disabled. On by default.

public bool EmbedArtifacts { get; set; }

Property Value

bool

EmbedSources

Embeds the source files those locations point at in the trace, so the viewer can show the code around each operation. Turn it off when a trace leaves the people who may read the suite's code. On by default.

public bool EmbedSources { get; set; }

Property Value

bool

Enabled

Enables automatic trace collection and export.

public bool Enabled { get; set; }

Property Value

bool

MaxArtifactBytes

The largest attachment the archive embeds, in bytes. An attachment over the limit is recorded as an error artifact (its name and size stay visible, its content is left out) instead of being held in memory or written. Defaults to 64 MB.

public long MaxArtifactBytes { get; set; }

Property Value

long

OutputPath

Optional output file. When omitted, Core writes TestResults/prototest-{runId}.prototrace.

public string? OutputPath { get; set; }

Property Value

string

RunMetadata

Explicit facts about the environment the run executed in - the CI build and run it came from - recorded with the run as environment.{key} attributes on its trace and as run-metadata items in its reports. A key must not be empty and must not collide with a built-in environment fact (runtime, os, processArchitecture, osArchitecture); values are recorded as-is, so record only what may travel in a trace.

public IDictionary<string, string> RunMetadata { get; }

Property Value

IDictionary<string, string>

RunMetadataEnvironmentVariables

Names of environment variables lifted into RunMetadata, such as GITHUB_RUN_ID on GitHub Actions. They are read once, when the host is built; a variable that is unset or empty contributes nothing, so a local run records no metadata. An explicit RunMetadata entry with the same name wins; a name must not be empty or collide with a built-in environment fact.

public IList<string> RunMetadataEnvironmentVariables { get; }

Property Value

IList<string>