|
24 | 24 | > 欢迎技术探讨与项目合作,解锁大模型与智能交互的无限可能! |
25 | 25 |
|
26 | 26 | --- |
27 | | - |
| 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 | +``` |
28 | 70 |
|
29 | 71 | ### **前言:代码执行流的“黑盒”困境** |
30 | 72 |
|
|
46 | 88 |
|
47 | 89 | 在 v0.7.0 中,我们专注于**体验统一**与**企业级特性**: |
48 | 90 |
|
| 91 | + |
| 92 | + |
49 | 93 | 1. **CLI 体验大一统**: |
50 | 94 | - 彻底重构命令行工具,现在只需运行 `mermaid-trace serve`。 |
51 | 95 | - 无论是**单个文件**还是**整个目录**,默认开启增强型 Web 预览(Master 模式)。 |
52 | 96 | - 支持 **SSE 实时热重载**、**交互式缩放/平移**,无需再记忆繁琐的参数。 |
53 | 97 | 2. **分布式追踪模拟**: |
| 98 | +  |
54 | 99 | - 新增 `10_distributed_trace_simulation.py` 示例,演示如何在微服务间传递 Trace Context。 |
55 | 100 | - 支持 **W3C Trace Context**、**B3** 等标准头,轻松串联跨服务调用。 |
56 | 101 | 3. **数据隐私与采样**: |
|
0 commit comments