Provide a restrictive dataCollection baseline that also covers keys added in minor releases

オープン
#25,659 コメント 2 件 リアクション 4 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

  • #25742 @sentry-junior による — マージされずにクローズ

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, typescript

調査の方向性

Start by reading the dataCollection option definitions and resolveDataCollectionOptions, which the issue names as the place that may apply defaults and fallbacks. Compare the proposed exported restrictive object with a resolver flag, including how replacement keys such as mcp inherit genAI settings. Done means choosing and implementing a baseline that keeps newly added keys off without breaking those fallbacks; the issue does not identify specific files or tests.

索引モデルが issue の本文から書いたものです。

説明

javascript

Problem

In v11, dataCollection replaces sendDefaultPii. Its defaults collect more data than v10 did. To keep the v10 behavior, users must set each key to a restrictive value manually (see Keeping the v10 default behavior).

This causes two problems:

  1. No single option keeps the v10 behavior. Users must copy the full object from the migration guide and keep it up to date.
  2. When a minor release adds a new dataCollection key, the new key collects by default. Users who turned off each key manually start to send the new data after they upgrade, with no change to their config.

Proposal

Export an object that we maintain, with a restrictive value for each key. Users spread it and turn on only what they want. A new key is then off by default:

Sentry.init({
  dataCollection: {
    ...Sentry.dataCollectionOff, // name TBD
    genAI: { inputs: true, outputs: false },
  },
});

Open questions

  • Which baseline do we use: all keys off, or the v10 defaults? "All off" also turns off stackFrameVariables and frameContextLines, which v10 collected.
  • Some keys replace an older key in a minor release and fall back to it when they are not set. For example, mcp falls back to genAI. If the exported object sets mcp to false, a user who sets genAI: { inputs: true } no longer gets MCP inputs, and no warning tells them. One alternative is a flag that the SDK resolves, for example dataCollection: { defaults: 'off' }. Then resolveDataCollectionOptions can apply the fallbacks before it turns off the keys that are not set.
主要言語
TypeScript
スター
8.8k
フォーク
1.9k
平均マージ
1日 8時間
マージ済み PR(30日)
744

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/sentry-javascript のほかの issue

getsentry/sentry-javascript の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。