Repository navigation
feat(cli): configure and test Tencent Cloud CLS tracing - #3187
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
为腾讯云 CLS(AgentObs)新增
octop cls configure、show和test。CLI 通过运行中 Octop 服务的管理 API 保存配置,使用具有observability权限的账户。保存后立即启用 CLS 上报,已启用 Langfuse 的实例将切换到 CLS。octop cls configure --new --region ap-guangzhou --app-name octop-prodoctop cls configure --existing --region ap-guangzhou --topic-id YOUR_TRACE_TOPIC_ID运行
octop cls configure可进入交互向导,也可从已有应用列表中选择。octop cls show显示当前后端、配置来源和脱敏后的设置。octop --json cls test分别报告管理 API 和 OTLP 上报端点的探测结果,失败时返回非零退出码。查看和测试均支持由服务端环境变量启用的 CLS,包括 STS 凭证。Target branch
developType of change
Test plan
make all PYTEST_JOBS=4通过,6,435 项通过,50 项跳过。Ruff 和 mypy 通过。uv run pytest -q tests/integration/test_cls_cli.py tests/unit/api/test_openapi_meta.py tests/unit/test_cls_observability.py tests/unit/cli/test_registry.py tests/unit/i18n通过,105 项通过。用真实 CLI 子进程和本地 Octop HTTP 服务分别跑通「新建应用 → 查看配置 → 测试连接」和「绑定已有 Topic → 查看配置 → 测试连接」。额外覆盖同名复用、交互选择、仅上报权限、认证失败、上报端点返回 403,以及 STS 环境配置切换后保留内网和脱敏设置。
仓库提交钩子通过,Dashboard 生产构建成功。首次运行时有 3 个 Git API 用例受外层 Git 环境影响;隔离临时仓库后,这 3 个用例全部通过。
集成测试使用模拟的腾讯云管理 API 和 OTLP 响应。真实腾讯云账号上的创建与上报仍待实测。
Checklist