Migrate IP address inference to `dataCollection.userInfo`

Open
#5,997 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
mobile-dev

Research direction

Start in packages/core/src/js/client.ts at lines 63 and 85, then review the existing IP address tests in packages/core/test/client.test.ts. Update both callsites to use the resolved dataCollection.userInfo value and adjust or add tests confirming the Relay setting and session listener behavior.

Written by the indexing model from the issue text.

Description

Errors React-Native Task

Replace sendDefaultPii checks for IP address handling with dataCollection.userInfo.

Callsites

  1. client.ts:63infer_ip setting for Relay: options.sendDefaultPii ? 'auto' : 'never'
  2. client.ts:85addAutoIpAddressToSession listener gated on sendDefaultPii === true

Both should read from the resolved dataCollection.userInfo instead.

References

  • packages/core/src/js/client.ts
  • packages/core/test/client.test.ts — existing tests for IP address behavior
Dominant language
TypeScript
Stars
1.8k
Forks
367
Avg merge
1d 6h
Merged PRs (30d)
94

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-react-native

All issues in getsentry/sentry-react-native

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.