Skip to content

demo(compute-mesh): add execution trace visualization to local_compute_mesh_demo#1077

Closed
Avi-47 wants to merge 1 commit intomofa-org:mainfrom
Avi-47:demo/compute-mesh-trace-visualization
Closed

demo(compute-mesh): add execution trace visualization to local_compute_mesh_demo#1077
Avi-47 wants to merge 1 commit intomofa-org:mainfrom
Avi-47:demo/compute-mesh-trace-visualization

Conversation

@Avi-47
Copy link
Copy Markdown
Contributor

@Avi-47 Avi-47 commented Mar 9, 2026

Summary

Implements execution trace visualization for the local_compute_mesh_demo example. This adds observability to the Compute Mesh pipeline by recording and displaying how requests flow through workflow execution, routing, backend selection, streaming inference, and metrics collection.

🔗 Related Issues

Closes #1075


🧠 Context

The Compute Mesh pipeline lacked observability - contributors couldn't easily see how requests moved through the system. This demo showcases the full pipeline with trace instrumentation at each stage.


🛠️ Changes

  • Created examples/local_compute_mesh_demo/ with:
    • Cargo.toml - Package configuration
    • src/main.rs - Demo implementation with execution trace
  • Added local_compute_mesh_demo to examples/Cargo.toml workspace

🧪 How I Tested

  1. cargo check - Verified code compiles
  2. cargo run -p local_compute_mesh_demo -- "Explain photosynthesis" - Ran demo successfully
  3. Verified execution trace output appears correctly

Logs

==== Compute Mesh Execution Trace ====

[trace] workflow.start
[trace] router.policy = LocalFirstWithCloudFallback
[trace] router.backend_selection = local
[trace] inference.start
[trace] streaming.tokens = token_1
...
[trace] metrics.latency_ms = 820
[trace] workflow.complete

📸 Screenshots

image image image image

⚠️ Breaking Changes

  • No breaking changes

🧹 Checklist

Code Quality

  • Code follows Rust idioms and project conventions
  • cargo fmt run
  • cargo clippy passes without warnings

Testing

  • Tests added/updated (demo doesn't require tests)
  • cargo test passes locally without any error

Documentation

  • Public APIs documented
  • README / docs updated (if needed)

PR Hygiene

  • PR is small and focused (one logical change)
  • Branch is up to date with main
  • No unrelated commits
  • Commit messages explain why, not only what

🚀 Deployment Notes (if applicable)

None - this is a demo example.


🧩 Additional Notes for Reviewers

This change improves observability of the Compute Mesh pipeline by making the full inference request lifecycle visible in the demo.

The execution trace helps contributors understand how requests flow through workflow execution, routing, backend selection, streaming inference, and metrics collection.


Branch pushed to: demo/compute-mesh-trace-visualization

Run command:

cargo run -p local_compute_mesh_demo -- "Explain photosynthesis"

@Avi-47 Avi-47 marked this pull request as ready for review March 9, 2026 15:55
@Avi-47
Copy link
Copy Markdown
Contributor Author

Avi-47 commented Mar 9, 2026

Hi @lijingrs and @BH3GEI,
This PR extends the local_compute_mesh_demo example with execution trace visualization so the full compute mesh request lifecycle becomes observable.
Since the change is example-only and CI checks already pass, I wanted to check whether the structure looks acceptable before continuing with the next demo improvements.
I appreciate any feedback when it's convenient for you.

@Avi-47
Copy link
Copy Markdown
Contributor Author

Avi-47 commented Mar 15, 2026

This change has been merged into a consolidated compute mesh demo PR #1248 that combines:

  • execution trace visualization
  • latency benchmarking
  • architecture documentation

The goal is to keep the demo features together so reviewers can see the full compute mesh pipeline in a single runnable example.

Closing this PR in favor of the consolidated version.
The execution trace functionality from this PR is included there.

Thanks!

@Avi-47 Avi-47 closed this Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

demo(compute-mesh): add execution trace visualization for compute mesh pipeline

1 participant