Skip to main content

rpc_span

Attribute Macro rpc_span 

Source
#[rpc_span]
Expand description

Instrument an ApiClientWrapper RPC method as operation = "rpc.<fn_name>" in libxmtp’s canonical, OTEL-safe span form (err, skip_all). Surfaces as xmtp.api.* Collector metrics. See [span] for the shared rationale.

#[xmtp_macro::rpc_span]
pub async fn upload_key_package(&self, ..) -> Result<()> { .. }
// → #[tracing::instrument(err, skip_all, fields(operation = "rpc.upload_key_package"))]