Module dataplane

Module dataplane 

Source
Expand description

Phase 219 data-plane span vocabulary.

Producer-side data-plane operations (FBMU, FBBU, GPU session, runtime capability cache) emit canonical ResourceSpans using the helpers in this module. Span names come from the PHASE_219_SPAN_NAMES contract; lease IDs are kept in the span body, never on Prometheus labels.

The vocabulary lives here — not in grafos-scheduler — so that data-plane producers (e.g. grafos-runtime, grafos-std) can emit spans without depending on the scheduler crate. This aligns with the v1.1 design (observability is substrate-level, not policy-level) and with §3.3 invariant 2 (every edge has a trace context, so every edge realization is a candidate emission site).

Enums§

DataplaneSpanKind
Phase 219 data-plane span family. Each variant maps 1:1 to a span name in PHASE_219_SPAN_NAMES so callers can refer to the family by typed identity rather than stringly-typed names.

Functions§

build_dataplane_span
Build a data-plane span using the Phase 219 canonical span names. The helper keeps the lease id in the span body (never a Prometheus label) and routes resource kind / operation / outcome through stable attribute keys so consumers see the same shape across families.
build_dataplane_span_from_traceparent
Build a data-plane span from an optional W3C traceparent.
dataplane_operation_label
Stable operation label for a producer-side OpType. Mirrors OpType’s fmt::Display impl but is &'static str so callers can set it as a span attribute without allocation. The match is exhaustive for the same reason as dataplane_span_kind_for_op_type.
dataplane_span_kind_for_op_type
Map a producer-side OpType to the Phase 219 data-plane span family it belongs to. TaskletSubmit is a control-plane submission and has no data-plane span kind — returning None keeps the vocabulary closed (callers must handle that variant explicitly).
emit_dataplane_span
Emit a data-plane span through grafos-observe’s shared span exporter.
emit_dataplane_span_from_traceparent
Emit a data-plane span from an optional W3C traceparent.