Skip to content

Commit 2e803e5

Browse files
committed
docs: replace image with mermaid architecture diagram in blog
1 parent 2dbe934 commit 2e803e5

3 files changed

Lines changed: 46 additions & 1 deletion

File tree

91 KB
Loading

docs/images/web_preview_ui.png

92 KB
Loading

docs/zh/BLOG.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,49 @@
2424
> 欢迎技术探讨与项目合作,解锁大模型与智能交互的无限可能!
2525
2626
---
27-
![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/1aa03f2b53d64abe8b8d4d28fe60dc63.png)
27+
```mermaid
28+
graph TD
29+
subgraph User_Space [用户层 User Space]
30+
Code[Python 代码]
31+
Decorators["@trace 装饰器"]
32+
Integrations[FastAPI / LangChain 集成]
33+
end
34+
35+
subgraph Core_Engine [核心引擎 Core Engine]
36+
Context[ContextVars 上下文管理]
37+
Queue[异步事件队列 Async Queue]
38+
Formatter[Mermaid 格式化器]
39+
end
40+
41+
subgraph Features [增强特性 Features]
42+
Masking[数据脱敏 Data Masking]
43+
Sampling[智能采样 Sampling]
44+
Optimize[循环折叠 Optimization]
45+
end
46+
47+
subgraph Output_Layer [输出与可视化 Output & Viz]
48+
File[.mmd 文件]
49+
Server[FastAPI 预览服务器]
50+
Browser[Web 浏览器 (热重载)]
51+
end
52+
53+
Code --> Decorators
54+
Code --> Integrations
55+
Decorators --> Context
56+
Integrations --> Context
57+
Context --> Queue
58+
Queue --> Optimize
59+
Optimize --> Masking
60+
Masking --> Formatter
61+
Formatter --> File
62+
File -.->|Watchdog 监听| Server
63+
Server == SSE 实时推送 ==> Browser
64+
65+
style User_Space fill:#e1f5fe,stroke:#01579b,stroke-width:2px
66+
style Core_Engine fill:#fff3e0,stroke:#ff6f00,stroke-width:2px
67+
style Features fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px
68+
style Output_Layer fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
69+
```
2870

2971
### **前言:代码执行流的“黑盒”困境**
3072

@@ -46,11 +88,14 @@
4688

4789
在 v0.7.0 中,我们专注于**体验统一****企业级特性**
4890

91+
![Web 预览界面](../images/web_preview_ui.png)
92+
4993
1. **CLI 体验大一统**
5094
- 彻底重构命令行工具,现在只需运行 `mermaid-trace serve`
5195
- 无论是**单个文件**还是**整个目录**,默认开启增强型 Web 预览(Master 模式)。
5296
- 支持 **SSE 实时热重载****交互式缩放/平移**,无需再记忆繁琐的参数。
5397
2. **分布式追踪模拟**
98+
![分布式追踪预览](../images/distributed_trace_preview.png)
5499
- 新增 `10_distributed_trace_simulation.py` 示例,演示如何在微服务间传递 Trace Context。
55100
- 支持 **W3C Trace Context****B3** 等标准头,轻松串联跨服务调用。
56101
3. **数据隐私与采样**

0 commit comments

Comments
 (0)