MetaMask / MetaMask/metamask-mobile

Enable sentry by default for DEV

Open
#20,402 0 comments 0 reactions 0 assignees View on GitHub
team-mobile-platform
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### What is this about?

We should enable sentry for devs by default, right now we only add it in one place [here](https://github.com/MetaMask/metamask-mobile/blob/29c4376e66f9fff0ffb7e75ac8a773e6a3f30d15/index.js#L32)

We also should understand if we could only initialize Sentry in one place and handling the sentry init logic inside of sentry singleton, instead of calling it in multiple places (look for where `setupSentry` is called in the codebase)

We also are [caching](https://github.com/MetaMask/metamask-mobile/blob/6f8e3f68d65d66051adfff4606fb305f2305e5d1/app/util/trace.ts#L465) the consent to metametrics, we need to handle it properly for dev

### Scenario

_No response_

### Design

_No response_

### Technical Details

_No response_

### Threat Modeling Framework

_No response_

### Acceptance Criteria

_No response_

### Stakeholder review needed before the work gets merged

- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at index.js line 32 and search the codebase for every setupSentry call to map the current initialization paths. Read app/util/trace.ts around line 465 to understand how metametrics consent is cached for development. Done means Sentry is enabled by default for developers and initialization and consent handling are consistently addressed across those paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
mobile-dev, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.