search_profiles default fields include columns dataset=profiles rejects (HTTP 400 Unknown field: thread.id)

未关闭 适合新手
#2,458 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
api, tooling

调研方向

从 packages/mcp-core/src/tools/support/search-events/config.ts 中的 RECOMMENDED_FIELDS.profiles.basic 开始,这里列出了 search_profiles 的默认字段。将该列表与 Sentry 的 src/sentry/search/events/datasets/profiles.py 中 COLUMNS 所接受的 profile 别名进行比较,然后更新使用相同属性的翻译提示词示例。当默认的 search_profiles 调用不再请求 thread.id 等字段,并且 search-events 测试通过时,即为完成。

由索引模型根据 Issue 内容生成。

描述

mcp-feedback-pattern

search_profiles asks the events API for columns that dataset=profiles does not have, so the default call fails with HTTP 400 Unknown field.

What happens

With no fields, search_profiles requests RECOMMENDED_FIELDS.profiles.basic (packages/mcp-core/src/tools/support/search-events/config.ts). That list includes profiler.id, thread.id, precise.start_ts, and precise.finish_ts. The translator prompt also lists these as profile attributes and has a "continuous profiles for a profiler session" example that uses them.

dataset=profiles only accepts the aliases in COLUMNS in getsentry/sentry src/sentry/search/events/datasets/profiles.py (plus project / project.name). ProfilesDatasetConfig.resolve_column raises InvalidSearchQuery(f"Unknown field: {column}") for anything else. /events/validate/ accepts the same request, so validation does not catch it.

Evidence (sentry/mcp-server spans, last 14 days)

  • GET /api/0/organizations/<org>/events/?dataset=profiles&... with field=thread.id: 503 calls, all span.status:error, 0 ok, across 38 MCP clients.
  • A default call with query=environment:production requested profile.id, profiler.id, thread.id, ..., precise.start_ts, precise.finish_ts and failed; the /events/validate/ call just before it with the same fields returned ok.

Reports

  • MCP-SERVER-GTE: "The default search_profiles call with a simple environment filter returned API HTTP 400 Unknown field: thread.id."

Report count: 1

via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_d229acf1bdc5e10705f0da9e1b043518.

--

View Session [Sentry]

主要语言
TypeScript
星标
975
派生
189
平均合并
19 小时 57 分钟
30 天内合并 PR
542

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/toolkit 的其他 Issue

查看 getsentry/toolkit 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。