docs(monit): document datasource query tools on the invoke entry - #380
Merged
Conversation
The DatasourceQueryExecution field note said from_ms was optional for VictoriaLogs instant executions. The invoke entry requires from_ms for every VictoriaLogs kind, and the VictoriaLogsQueryParams description already says so; make the field note agree.
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.
变更摘要
monit-datasource-tools-invoke的 description 收敛为单句(诊断或查询工具),细节下沉到x-mint.content新增的 Usage / 使用说明小节(工具族划分、协议里程碑门槛、params 约定、Explore 结果形态、统一大小/超时边界)。DatasourceQueryExecution(instant/range/window 三种执行模式,公开 Schema 不含保留字段step_seconds)+ 10 种数据源的<Type>QueryParams(prometheus、mysql、postgres、oracle、clickhouse、elasticsearch、loki、victorialogs、sls、tencent_cls),覆盖 limit/direction 日志选项、SLS project/logstore/powersql、CLS region/topic_id/syntax 及各自的 kind 约束。tool/params描述替换过时的 "mysql.query/postgres.query unsupported" 表述,改为按数据源列出查询工具及对应 params Schema。example改为examples命名映射,新增query示例(prometheus.query instant,完整explore_result.v1结果信封)。zh/en/developer/cli.mdx与zh/en/developer/go-sdk.mdx中datasource-tools-invoke/ToolsInvoke段落同步更新查询工具表述与 10 MiB 上限。追加:统一 monit-query 命令(c663e0d)
zh/en/developer/cli.mdx的monit-query章节整体改写为统一 tool 调用形态(无子命令):fduty monit-query <datasource-id> --tool '<name>' [--params '<json>'];查询工具与诊断工具都走它,旧monit-query data子命令退役(含原rows弃用段落一并移除)。query_result.v1同步为explore_result.v1(samples/frames/logs);章节内不再出现/monit/query/data。monit datasource-tools-invoke章节保留(命令仍存在),注明与monit-query等价、后者为推荐路径。/monit/query/data暂不从公开 OpenAPI 下线(等客户迁移),spec 改动保持不变;go-sdk.mdx的 QueryData 段落保留不动。契约来源
字段级权威为 monit-webapi PR #119(已上线):
types/datasource_query_tools.go、logic/datasource_query_tools.go、pkg/exploreprotocol/validate.go(validateHTTPExecution)。验证
json.load解析。python3 scripts/lint_openapi.py退出码 0(12 个 spec 文件无违规)。mint broken-links通过(no broken links found)。git diff --stat符合预期:4 个 JSON + 4 个 mdx。后续依赖
go-flashduty SDK 将 sync 本 spec(新增 Schema 与字段描述以本文档为准)。