Sentry error tracking and monitoring for OneKey. Use when configuring Sentry, filtering errors, analyzing crash reports, or debugging production issues. Covers platform-specific setup (desktop/mobile/web/extension) and error filtering strategies.
65
79%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.skillshare/skills/1k-sentry/SKILL.mdOneKey uses Sentry for error tracking across all platforms.
apps/
├── desktop/app/sentry.ts # Desktop main process
├── ext/ # Extension (uses shared)
├── mobile/ # Mobile (uses shared)
└── web/ # Web (uses shared)
packages/shared/src/modules3rdParty/sentry/
├── index.ts # Web/Extension entry
├── index.native.ts # React Native entry
├── index.desktop.ts # Desktop renderer entry
├── basicOptions.ts # Shared config & error filtering
└── instance.ts # Sentry client instanceimport platformEnv from '@onekeyhq/shared/src/platformEnv';
platformEnv.isDesktop // Electron desktop app
platformEnv.isNative // React Native (iOS/Android)
platformEnv.isWeb // Web browser
platformEnv.isExtension // Browser extension
platformEnv.isWebEmbed // Embedded web componentsSee: references/rules/ignoring-errors.md
Key file: packages/shared/src/modules3rdParty/sentry/basicOptions.ts
/1k-patching-native-modulesimport * as Sentry from '@sentry/react-native'; // or @sentry/browser
// Add breadcrumb
Sentry.addBreadcrumb({
category: 'action',
message: 'User clicked button',
level: 'info',
});
// Set user context
Sentry.setUser({ id: 'user-id' });
// Set tags
Sentry.setTag('feature', 'swap');
// Capture exception with context
Sentry.captureException(error, {
extra: { additionalData: 'value' },
});| Purpose | File |
|---|---|
| Error filtering | packages/shared/src/modules3rdParty/sentry/basicOptions.ts |
| Desktop main | apps/desktop/app/sentry.ts |
| Desktop renderer | packages/shared/src/modules3rdParty/sentry/index.desktop.ts |
| Web/Extension | packages/shared/src/modules3rdParty/sentry/index.ts |
| Native | packages/shared/src/modules3rdParty/sentry/index.native.ts |
// Filter by error type
const FILTERED_ERROR_TYPES = new Set(['AxiosError', 'HTTPClientError']);
// Filter by exact message
const FILTER_ERROR_VALUES = ['AbortError: AbortError'];
// Filter by pattern (in isFilterErrorAndSkipSentry function)
if (error.value?.includes('PATTERN')) return true;/1k-patching-native-modules - Fix native crashes found in Sentry/1k-coding-patterns - Error handling best practices3cff1b4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.