| edition = "2023"; |
| |
| package milotic_hft; |
| |
| // EdgeFilter describes a per-identifier edge-side operation that |
| // the HFT server applies to that identifier's sample stream. |
| // If the server does not recognize the configured |
| // variant, it falls through to unfiltered streaming. |
| message EdgeFilter { |
| oneof filter { |
| OnChangeFilter on_change = 1; |
| // Reserved for future filter variants. |
| } |
| } |
| |
| // OnChangeFilter emits a sample only when its value differs from the most |
| // recently emitted sample beyond a threshold, with an optional heartbeat |
| // to assert liveness when the value is steady. |
| message OnChangeFilter { |
| // Absolute delta threshold: a sample passes the filter when |
| // |current - last_emitted| > float_epsilon. 0 means emit on any change. |
| // For uint64 `count` readings the threshold is float_epsilon rounded to the |
| // nearest whole count. |
| float float_epsilon = 1; |
| |
| // Maximum interval between emissions for this identifier when the |
| // value is unchanged. 0 disables the heartbeat. Effective resolution |
| // is rounded up to a multiple of export_interval_ms. |
| // |
| // The same cadence also re-asserts an unchanged non-OK status |
| // (STALE/MISSING): with a heartbeat configured, a persistent stall |
| // marker is re-emitted once per heartbeat interval instead of only |
| // once on the status transition. |
| int32 heartbeat_interval_ms = 2; |
| } |