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

Offen
#25,659 2 Kommentare 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

  • #25742 von @sentry-junior — ohne Merge geschlossen

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.
Vorherrschende Sprache
TypeScript
Sterne
8.8k
Forks
1.9k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
744

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus getsentry/sentry-javascript

Alle Issues in getsentry/sentry-javascript

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.