recordPlan
Records Draft coordination-cost gauges into this WarpMetricExporter.
Computes the us.tractat.kuilt.warp.CoordinationCost from draft and stats, then writes two GAUGE metrics:
| name | value |
|---|---|
warp.coordination.volume | estimated elements entering the coordinated stage |
warp.coordination.rounds | number of consensus rounds the draft requires |
A plan attribute is added automatically:
"unplanned"when Draft.isMonotone istrue— no coordination step, so no planning consideration is needed (rounds = 0, volume = 0)."planned"when Draft.isMonotone isfalse— the draft has a coordination stage; the planner's work is relevant, and the volume reflects filter pushdown.
This lets dashboards compare pre- and post-us.tractat.kuilt.warp.plan volumes: an unoptimised draft records a high volume under plan="planned", while the optimised draft records a lower volume under the same key.
Parameters
The Draft pipeline to cost.
WarpStats sketches used to estimate cardinality at each stage.
Additional label attributes merged with the auto-computed plan attr.
Monotonically increasing timestamp for LWW tiebreaking across replicas. Use Clock.System.now().toEpochMilliseconds() in production; a fixed value in tests.