.NET API
TraconQuotaOptions
Tracon.Core.dllDefines options for the quota subsystem.
public sealed class TraconQuotaOptionsInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Read from the Tracon:Quotas configuration section.
Constructors
Section titled “Constructors”TraconQuotaOptions()
Section titled “ TraconQuotaOptions()”public TraconQuotaOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”Gets the configuration section name.
public const string SectionName = "Tracon:Quotas"Field Value
Section titled “Field Value”Properties
Section titled “Properties”AllowOnStoreFailure
Section titled “ AllowOnStoreFailure”Gets or sets whether to allow a run when quota enforcement fails.
public bool AllowOnStoreFailure { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Defaults to true so a temporary database outage does not stop the service. A strict deployment can set this to false and choose “do not run when quota cannot be verified”.
Enabled
Section titled “ Enabled”Gets or sets whether quota enforcement is enabled. When disabled, rules can be stored but no run is rejected and no counter increments.
public bool Enabled { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Defaulting to true is safe: nothing is rejected while no rule exists. The “no default quota” rule comes from an empty rule set, not from disabling the subsystem.
PublishThresholdToRunStream
Section titled “ PublishThresholdToRunStream”Gets or sets whether a crossed quota threshold is also written as a RunEventType.Custom notice (RunEventCustomTypes.QuotaThreshold) into the triggering root run’s own event stream, before its terminal event.
public bool PublishThresholdToRunStream { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Defaults to false: with it off, behavior is
byte-for-byte identical to before this option existed — the same
quota.threshold webhook, no new frame in the run’s event
stream. The webhook itself is unaffected by this flag; it always
fires when a threshold is crossed, exactly as before.
A consumer that wants a threshold notice correlated to the exact run and delivered on the same connection the run streamed from turns this on. See RunEventCustomTypes.QuotaThreshold for the event’s shape and the guarantee that only Tracon can write it.
ThresholdPercents
Section titled “ ThresholdPercents”Gets percentages that publish a quota.threshold event when the
quota counter reaches them.
public IList<int> ThresholdPercents { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Each threshold is published once per period. Otherwise, every run above the threshold would produce a new event as the counter increments.
TimeZone
Section titled “ TimeZone”Gets or sets the time zone used to calculate period boundaries. Windows and IANA names are accepted.
public string TimeZone { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”An administrator who says “daily quota” means their business day. The consumer is therefore expected to change the default UTC time zone.
Methods
Section titled “Methods”ResolveTimeZone()
Section titled “ ResolveTimeZone()”Returns the resolved time zone, falling back to UTC when its name is unknown.
public TimeZoneInfo ResolveTimeZone()Returns
Section titled “Returns”The time zone.
Remarks
Section titled “Remarks”An unrecognized name does not throw because quota enforcement must not
stop all traffic for a bad name. TraconQuotaOptionsValidator
validates it during startup and reports the error there.