Skip to content

feat: 补齐 MCP 工具与 Sandbox Trace 链路 --story=1070093903137679449 - #847

Merged
benero merged 4 commits into
TencentBlueKing:developfrom
benero:dev/1070093903137679449-trace-coverage
Aug 28, 2026
Merged

feat: 补齐 MCP 工具与 Sandbox Trace 链路 --story=1070093903137679449#847
benero merged 4 commits into
TencentBlueKing:developfrom
benero:dev/1070093903137679449-trace-coverage

Conversation

@benero

@benero benero commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

变更

  • 为 MCP tools/list 增加 CLIENT Span 与 server、transport、retry、tool count 语义
  • 为 MCP 与普通 HTTP 工具的 tool.execution 增加可检索语义属性
  • 为 PaaS Sandbox 远程操作增加 CLIENT Span,覆盖重试与底层 HTTP
  • 保持 OpenTelemetry extra 可选,未安装时自动 no-op
  • SessionContentProperty 增加 trace_id,确保 Session Content 属性可序列化并返回创建链路标识
  • template 使用的 bkplugin 统一响应从当前 Span 补齐 trace_id;覆盖普通成功、错误响应和流式响应头

验证

  • 目标文件 pre-commit(ruff、ruff-format、merge-conflict)通过
  • SessionContentProperty trace_id 新增测试 1 passed
  • 当前 Trace ID 与 template 响应新增测试 4 passed
  • 原有 Trace 新增定向测试 5 passed
  • 无 OpenTelemetry extra 环境导入与 no-op 降级通过

范围

仅 Trace 相关;不包含 query_param 序列化与 MCP GET/DELETE 兼容修改。

@tencentblueking-adm

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


bennychen seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@benero
benero merged commit e4983df into TencentBlueKing:develop Aug 28, 2026
4 of 8 checks passed
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.

2 participants