Skip to content
Tracon

RunEventCustomTypes

Namespace Tracon · Assembly Tracon.Abstractions.dll

Validation for the CustomType string that qualifies a RunEventType.Custom event.

public static class RunEventCustomTypes

objectRunEventCustomTypes

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Repeats the JobHandlerKeys pattern: a namespaced, lowercase ASCII string with a reserved prefix Tracon itself never emits, so a future built-in custom type can never collide with a consumer’s own.

The RunEventType.Custom type of the quota threshold notice a root run’s completion writes into its own event stream.

public const string QuotaThreshold = "tracon.quota.threshold"

string

Falls under RunEventCustomTypes.ReservedPrefix: a consumer cannot write an event under this type, so a client can trust that every event carrying it came from Tracon itself, not from the agent’s own tool code. Off by default (TraconQuotaOptions.PublishThresholdToRunStream).

The prefix reserved for Tracon’s own use.

public const string ReservedPrefix = "tracon."

string

A consumer’s CustomType starting with this prefix is rejected at write time — not because Tracon ships a built-in custom type today, but so one could be added later without ever colliding with a consumer’s own.

Checks whether customType falls inside the RunEventCustomTypes.ReservedPrefix namespace.

public static bool IsReserved(string? customType)

customType string?

The candidate type.

bool

true if the type is reserved for Tracon.

Checks whether customType is a valid custom event type: 1-128 characters, lowercase ASCII letters, digits, ., _, or -, starting with a letter or digit.

public static bool IsValidType(string? customType)

customType string?

The candidate type.

bool

true if the type is valid.

Uppercase letters are rejected, not normalized — the same reasoning as JobHandlerKeys.IsValidKey. A consumer that read back its own event compares the type ordinally, so allowing case variants would let "Contoso.Preview" and "contoso.preview" silently become two different types.