Use typed detector schemas from @sentry/api for metric monitors
メンテナーはふだん 1 日以内に返信
@MathurAditya724 がすでに取り組んでいます。
2026年10月22日 から。
評価
この issue はまだ評価されていません。
説明
@sentry/api leaves the detector (monitor) payloads mostly untyped. Because of that, toolkit has to keep its own copy of the metric monitor data source and condition values.
Checked against @sentry/api 0.381.0, the latest release. The CLI pins ^0.356.0 and mcp-core pins 0.337.0.
Gaps in types.gen.d.ts
Create/UpdateOrganizationDetectorData:data_sources?: Array<unknown>andcondition_group.conditions?: Array<unknown>.configis{ [key: string]: unknown }.GetOrganizationDetectorResponses[200]:dataSources,conditionGroup, andconfigare all{ [key: string]: unknown }.- The accepted values appear only in doc comments:
dataset,queryType,eventTypes,timeWindow, conditiontype/comparison/conditionResult, anddetectionType/comparisonDelta. The generated zod and valibot schemas have the same gaps.
Workaround today
#1591 adds @sentry/toolkit-core/metric-monitor. It hand-copies these values from Sentry's SnubaQueryValidator (QUERY_TYPE_VALID_DATASETS / QUERY_TYPE_VALID_EVENT_TYPES) and MetricIssueComparisonConditionValidator. The CLI (packages/cli/src/types/metric-alert.ts, packages/cli/src/lib/api/alerts.ts) and MCP (packages/mcp-core/src/tools/support/metric-monitor-config.ts) both consume that module and cast detector bodies through unknown.
Ask
- Get typed detector schemas into
@sentry/api, likely by adding typed serializers or validators for the detector endpoints ingetsentry/sentryso the generated OpenAPI spec carries them:- a snuba-query data source (dataset / queryType / eventTypes enums)
- metric comparison and anomaly conditions
- detection config
- Once those land, swap
@sentry/toolkit-core/metric-monitorand the CLI/MCP casts for the generated types and schemas, and bump@sentry/apiin both packages.
Raised by @BYK in review on #1591.
via BYK.
--
- 主要言語
- TypeScript
- スター
- 938
- フォーク
- 166
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 171
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/toolkit のほかの issue
-
bug MCP
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
getsentry/toolkit#1621 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug MCP
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
getsentry/toolkit#1618 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Docs MCP tool failures omit isError対応中かも @thomasjiangcy が 1 日前に担当しました。 オープンbug MCP
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/toolkit#1600 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
getsentry/toolkit#1471 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
getsentry/toolkit#1632 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
getsentry/toolkit の issue をすべて見る
似ている issue
-
[Bug]: Device screenshot fails with 500 on iPhone Duo (Xcode 27.2): serve-sim calls simctl without --display対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
pingdotgg/t3code#24900 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
inu-appcenter/UNIDorm-web#411 ·
メンテナーはふだん 1 日以内に返信
-
🐛 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ranxianglei/billion-context#4720 ·
メンテナーはふだん 1 日以内に返信
-
area:arcade game p3-medium ready-for-agent type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
fderuiter/deruiter.dev#2840 ·
メンテナーはふだん 1 日以内に返信