feat: add executor tracing, auto-register primitives, and Default impls

- Add info!-level tracing to workflow executor: logs each execution
  round, each step run (with type and name), step completion, and
  workflow completion
- WorkflowHost.start() now auto-registers all built-in primitive step
  types so users don't need to register them manually
- Add #[derive(Default)] to all primitive steps and PollEndpointConfig
- Add tracing-subscriber to wfe crate for the pizza example
- Pizza example now shows full step-by-step execution logs
This commit is contained in:
2026-03-25 20:32:47 +00:00
parent 6d57f8ef22
commit 88fc6bf7ad
13 changed files with 70 additions and 3 deletions

View File

@@ -3,8 +3,9 @@ use std::time::Duration;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum HttpMethod {
#[default]
Get,
Post,
Put,
@@ -25,7 +26,13 @@ pub enum PollCondition {
BodyContains(String),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
impl Default for PollCondition {
fn default() -> Self {
Self::StatusCode(200)
}
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct PollEndpointConfig {
/// URL template. Supports `{placeholder}` interpolation from workflow data.
pub url: String,