.NET API
QuotaThresholdCrossing
Tracon.Abstractions.dllA single quota threshold crossed by a period’s consumption.
public sealed record QuotaThresholdCrossing : IEquatable<QuotaThresholdCrossing>Inheritance
Section titled “Inheritance”object ← QuotaThresholdCrossing
Implements
Section titled “Implements”IEquatable<QuotaThresholdCrossing>
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”Returned by QuotaEnforcer.RecordAsync for every threshold that a
completed root run’s consumption newly crossed — “newly” meaning the
durable per-period dedup (IQuotaStore) claimed it for the first
time; a threshold already claimed by an earlier run or a concurrent
worker is not returned again.
A single completion can cross more than one threshold at once (for example both the 80% and the 100% mark of the same metric, or the QuotaMetric.Tokens and QuotaMetric.Cost metrics of the same rule) — each crossing is reported separately, one notice per metric/threshold pair.
Constructors
Section titled “Constructors”QuotaThresholdCrossing()
Section titled “ QuotaThresholdCrossing()”public QuotaThresholdCrossing()Properties
Section titled “Properties”AgentName
Section titled “ AgentName”The agent the rule is bound to. null for a tenant-wide rule.
public string? AgentName { get; init; }Property Value
Section titled “Property Value”The rule’s defined limit.
public required decimal Limit { get; init; }Property Value
Section titled “Property Value”Metric
Section titled “ Metric”The metric whose threshold was crossed.
public required QuotaMetric Metric { get; init; }Property Value
Section titled “Property Value”NoticeId
Section titled “ NoticeId”The dedup/delivery identifier for this crossing. Stable for the
lifetime of the notice: a client that reads it again (through
Last-Event-ID resumption or GET /api/runs/{id}/events)
sees the same value and can suppress a duplicate warning.
public required string NoticeId { get; init; }Property Value
Section titled “Property Value”Period
Section titled “ Period”The counter’s interval.
public required QuotaPeriod Period { get; init; }Property Value
Section titled “Property Value”ResetsAt
Section titled “ ResetsAt”The time the counter resets (UTC).
public DateTimeOffset? ResetsAt { get; init; }Property Value
Section titled “Property Value”ThresholdPercent
Section titled “ ThresholdPercent”The crossed threshold percentage (for example 80 or 100).
public required int ThresholdPercent { get; init; }Property Value
Section titled “Property Value”The consumption at the moment the threshold was claimed.
public required decimal Used { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(QuotaThresholdCrossing?)
Section titled “ Equals(QuotaThresholdCrossing?)”public bool Equals(QuotaThresholdCrossing? other)Parameters
Section titled “Parameters”other QuotaThresholdCrossing?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(QuotaThresholdCrossing?, QuotaThresholdCrossing?)
Section titled “ operator ==(QuotaThresholdCrossing?, QuotaThresholdCrossing?)”public static bool operator ==(QuotaThresholdCrossing? left, QuotaThresholdCrossing? right)Parameters
Section titled “Parameters”left QuotaThresholdCrossing?
right QuotaThresholdCrossing?
Returns
Section titled “Returns”operator !=(QuotaThresholdCrossing?, QuotaThresholdCrossing?)
Section titled “ operator !=(QuotaThresholdCrossing?, QuotaThresholdCrossing?)”public static bool operator !=(QuotaThresholdCrossing? left, QuotaThresholdCrossing? right)Parameters
Section titled “Parameters”left QuotaThresholdCrossing?
right QuotaThresholdCrossing?