Module context

Module context 

Source
Expand description

Resource context tracking for fabric observability.

ResourceContext is a thread-local struct that tracks active leases within the current scope. It is automatically populated by grafos-std when the observe feature is enabled, and read by #[grafos::instrument] to annotate spans with resource metadata.

Structsยง

ContextSnapshot
A snapshot of the resource context at a point in time.
LeaseInfo
Information about a single active lease tracked in the resource context.
OpCounters
Per-scope operation counters tracked by #[grafos::instrument].
ResourceContext
Thread-local resource context tracking active leases and operation counts.