pub async fn dispatch_action(
service: &SomaService,
action: &SomaAction,
surface: &str,
) -> Result<Value>Expand description
Unified dispatch seam shared by every surface (MCP, REST, CLI).
Wraps execute_service_action with consistent timing, structured logging,
and metrics so each surface gets identical observability for free. The shims
call this instead of execute_service_action directly; execute_service_action
remains public for callers that have already established their own span.
surface is a short, low-cardinality label such as "mcp", "rest", or
"cli". Action parameters are intentionally never logged or labelled —
they can carry credentials, and per-value labels would explode metric
cardinality.