onekeyhq/app-monorepo58 installs
1k-sentry
Configure OneKey Sentry and filter events across desktop, mobile, web, and extension.
How do I install this agent skill?
npx skills add https://github.com/onekeyhq/app-monorepo --skill 1k-sentryIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides developer documentation and coding patterns for managing Sentry error filtering and context across various platforms (desktop, mobile, web, and extension) within the OneKey project. It contains no malicious patterns, sensitive data, or security risks.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- Runlayerwarn
2/2 files flagged
What does this agent skill do?
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
import 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 components
Common Tasks
Filter/Ignore Errors
See: references/rules/ignoring-errors.md
Key file: packages/shared/src/modules3rdParty/sentry/basicOptions.ts
Add Custom Context
import * 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' },
});
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
// 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;
Related Skills
/1k-coding-patterns- Error handling best practices
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/onekeyhq/app-monorepo/1k-sentry">View 1k-sentry on skillZs</a>