Skip to content

feat(pii): Soft-deprecate send_default_pii + backwards-compatible mapping #3002

Description

@sl0thentr0py

Stack position: 3/10. Blocked by #3000**.**

Keep send_default_pii working while making data_collection the single source of truth internally, so downstream wiring reads only data_collection.

Scope

  • Emit a soft-deprecation warning when send_default_pii= is used.
  • Map the legacy flag onto data_collection defaults:
    • send_default_pii = false → conservative/restricted categories (current Ruby default)
    • send_default_pii = true → spec-permissive set (collect user identity, bodies, cookies, query params, db params)
  • Precedence: an explicitly-configured data_collection category wins over the legacy flag.
  • Provide a single internal resolver (e.g. configuration.data_collection fully-resolved) that all instrumentation reads — no code should branch on the raw send_default_pii boolean after this PR.
  • Update the doc comment block at sentry-ruby/lib/sentry/configuration.rb:229-235.

Files

  • sentry-ruby/lib/sentry/configuration.rb
  • sentry-ruby/spec/sentry/configuration_spec.rb

Tests

  • Mapping for true / false; explicit data_collection overrides legacy flag; deprecation notice emitted once.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions