()
| 16 | ) |
| 17 | |
| 18 | func main() { |
| 19 | // ====== 示例 1: 基础 OTel 集成 ====== |
| 20 | fmt.Println("=== Example 1: Basic OpenTelemetry Integration ===") |
| 21 | basicOTelExample() |
| 22 | |
| 23 | // ====== 示例 2: Agent 追踪 ====== |
| 24 | fmt.Println("\n=== Example 2: Agent Tracing ===") |
| 25 | agentTracingExample() |
| 26 | |
| 27 | // ====== 示例 3: LLM 调用追踪 ====== |
| 28 | fmt.Println("\n=== Example 3: LLM Call Tracing ===") |
| 29 | llmTracingExample() |
| 30 | |
| 31 | // ====== 示例 4: 工具执行追踪 ====== |
| 32 | fmt.Println("\n=== Example 4: Tool Execution Tracing ===") |
| 33 | toolTracingExample() |
| 34 | |
| 35 | // ====== 示例 5: 分布式追踪 ====== |
| 36 | fmt.Println("\n=== Example 5: Distributed Tracing ===") |
| 37 | distributedTracingExample() |
| 38 | |
| 39 | fmt.Println("\nAll examples completed successfully!") |
| 40 | } |
| 41 | |
| 42 | // basicOTelExample 演示基础 OpenTelemetry 集成 |
| 43 | func basicOTelExample() { |
nothing calls this directly
no test coverage detected