<< All versions
Skill v1.0.0
currentLLM-judged scan90/100onekeyhq/app-monorepo/1k-sentry
──Details
PublishedOctober 21, 2026 at 05:14 AM
Content Hashsha256:beb1a024e57b1177...
Git SHAf944fbcfe7a1
──Files
Files (1 file, 2.7 KB)
SKILL.md2.7 KBactive
SKILL.md · 98 lines · 2.7 KB
version: "1.0.0" name: 1k-sentry description: Configure OneKey Sentry and filter events across desktop, mobile, web, and extension.
Sentry Integration
OneKey uses Sentry for error tracking across all platforms.
Architecture Overview
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 instance
Platform Detection
typescript
import platformEnv from '@onekeyhq/shared/src/platformEnv';platformEnv.isDesktop // Electron desktop appplatformEnv.isNative // React Native (iOS/Android)platformEnv.isWeb // Web browserplatformEnv.isExtension // Browser extensionplatformEnv.isWebEmbed // Embedded web components
Common Tasks
Filter/Ignore Errors
See: references/rules/ignoring-errors.md
Key file: packages/shared/src/modules3rdParty/sentry/basicOptions.ts
Add Custom Context
typescript
import * as Sentry from '@sentry/react-native'; // or @sentry/browser// Add breadcrumbSentry.addBreadcrumb({category: 'action',message: 'User clicked button',level: 'info',});// Set user contextSentry.setUser({ id: 'user-id' });// Set tagsSentry.setTag('feature', 'swap');// Capture exception with contextSentry.captureException(error, {extra: { additionalData: 'value' },});
Key Files
| 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 |
Error Filtering Quick Reference
typescript
// Filter by error typeconst FILTERED_ERROR_TYPES = new Set(['AxiosError', 'HTTPClientError']);// Filter by exact messageconst FILTER_ERROR_VALUES = ['AbortError: AbortError'];// Filter by pattern (in isFilterErrorAndSkipSentry function)if (error.value?.includes('PATTERN')) return true;
Related Skills
/1k-coding-patterns- Error handling best practices