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

Abierto
#25,659 2 comentarios 4 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

  • #25742 de @sentry-junior — cerrado sin fusionar

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
8.8k
Forks
1.9k
Merge medio
1 d 8 h
PR fusionados (30 d)
744

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de getsentry/sentry-javascript

Todos los issues de getsentry/sentry-javascript

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.