Payload
{
"action": "closed",
"issue": {
"url": "https://api.github.com/repos/voytravel/voy/issues/483",
"repository_url": "https://api.github.com/repos/voytravel/voy",
"labels_url": "https://api.github.com/repos/voytravel/voy/issues/483/labels{/name}",
"comments_url": "https://api.github.com/repos/voytravel/voy/issues/483/comments",
"events_url": "https://api.github.com/repos/voytravel/voy/issues/483/events",
"html_url": "https://github.com/voytravel/voy/issues/483",
"id": 3832314224,
"node_id": "I_kwDOPLnB3s7kbHlw",
"number": 483,
"title": "if needed in the future.",
"user": {
"login": "github-actions[bot]",
"id": 41898282,
"node_id": "MDM6Qm90NDE4OTgyODI=",
"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/github-actions%5Bbot%5D",
"html_url": "https://github.com/apps/github-actions",
"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
"type": "Bot",
"user_view_type": "public",
"site_admin": false
},
"labels": [],
"state": "closed",
"locked": false,
"assignees": [],
"milestone": null,
"comments": 1,
"created_at": "2026-01-20T06:52:46Z",
"updated_at": "2026-07-20T22:14:23Z",
"closed_at": "2026-07-20T22:14:23Z",
"assignee": null,
"author_association": "NONE",
"issue_field_values": [],
"type": null,
"active_lock_reason": null,
"sub_issues_summary": {
"total": 0,
"completed": 0,
"percent_completed": 0
},
"issue_dependencies_summary": {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
},
"body": "https://github.com/voytravel/voy/blob/66a07c3bba47165ef23e09dbdd9f00d09f115174/apps/expo/src/lib/share-extension/sentry-utils.ts#L73-L74\n\n```typescript\n\nimport { env } from \"@voytravel/env/expo\";\nimport * as Application from \"expo-application\";\nimport * as Device from \"expo-device\";\nimport { Platform } from \"react-native\";\nimport { getShareExtensionUserIdFromCache } from \"./auth-cookie\";\n\n/**\n * Lightweight error reporting for share extension.\n * Uses Sentry HTTP API directly instead of the full SDK to stay under\n * iOS extension's 120MB memory limit.\n */\n\n// =============================================================================\n// CONFIG\n// =============================================================================\n\n// Parse DSN to get project ID and key\nconst parseDsn = (dsn: string) => {\n const match = dsn.match(/https:\\/\\/([^@]+)@([^/]+)\\/(\\d+)/);\n if (!match) return null;\n return { key: match[1], host: match[2], projectId: match[3] };\n};\n\nconst sentryConfig = parseDsn(env.SENTRY_DSN);\n\nconst SHARE_EXTENSION_SENTRY_ENABLED = env.NODE_ENV !== \"development\";\n\n// =============================================================================\n// INTERNAL UTILITIES\n// =============================================================================\n\n// Generate a random 32-character hex ID\nconst generateHexId = () => {\n const chars = \"0123456789abcdef\";\n let id = \"\";\n for (let i = 0; i < 32; i++) {\n id += chars[Math.floor(Math.random() * 16)];\n }\n return id;\n};\n\n// Parse stack trace into Sentry frame format\nconst parseStackTrace = (stack: string) => {\n const lines = stack.split(\"\\n\").slice(1);\n return lines\n .map((line) => {\n const match = line.match(/at\\s+(.+?)\\s+\\((.+):(\\d+):(\\d+)\\)/);\n if (match?.[1] && match[2] && match[3] && match[4]) {\n return {\n function: match[1],\n filename: match[2],\n lineno: parseInt(match[3], 10),\n colno: parseInt(match[4], 10),\n };\n }\n return null;\n })\n .filter((frame): frame is NonNullable<typeof frame> => frame !== null)\n .reverse();\n};\n\n// =============================================================================\n// STATE\n// =============================================================================\n\n/**\n * Lightweight session tracking to mimic Sentry SDK's autoSessionTracking.\n * Correlates events from the same extension usage so they can be grouped in Sentry.\n * Generated once per extension lifecycle.\n *\n * Note: This doesn't provide full SDK session features like Release Health metrics,\n * session replay, or crash detection - those require the /envelope/ API and more\n * complex lifecycle management. Left as TODO if needed in the future.\n */\nconst sessionId = generateHexId();\nconst sessionStart = Date.now() / 1000;\nlet sessionErrorCount = 0;\n\n/** Get current session info for Sentry events */\nconst getSessionContext = () => ({\n session_id: sessionId,\n session_start: sessionStart,\n session_duration: Date.now() / 1000 - sessionStart,\n session_error_count: sessionErrorCount,\n});\n\ntype Breadcrumb = {\n category?: string;\n message?: string;\n level?: \"info\" | \"warning\" | \"error\";\n data?: Record<string, unknown>;\n timestamp?: number;\n};\n\n// In-memory breadcrumbs (lightweight alternative to SDK breadcrumb tracking)\nconst breadcrumbs: Breadcrumb[] = [];\n\n// Internal function to add breadcrumb\nconst addBreadcrumb = (\n category: string,\n message: string,\n level: \"info\" | \"warning\" | \"error\" = \"info\",\n data?: Record<string, unknown>,\n) => {\n breadcrumbs.push({\n category,\n message,\n level,\n data,\n timestamp: Date.now() / 1000,\n });\n\n // Keep only last 20 breadcrumbs to limit memory usage\n if (breadcrumbs.length > 20) {\n breadcrumbs.shift();\n }\n};\n\n// =============================================================================\n// EXPORTED API\n// =============================================================================\n\n/**\n * Add a breadcrumb with consistent category for share extension.\n * Stored in memory and sent with any captured exceptions.\n */\nexport const addShareExtensionBreadcrumb = (\n message: string,\n data?: Record<string, unknown>,\n) => {\n addBreadcrumb(\"share-extension\", message, \"info\", data);\n};\n\n/**\n * Add a fetch/HTTP breadcrumb (similar to Sentry SDK auto-capture).\n * Call this after making network requests.\n */\nexport const addFetchBreadcrumb = (\n method: string,\n url: string,\n statusCode?: number,\n data?: Record<string, unknown>,\n) => {\n const level = statusCode && statusCode >= 400 ? \"warning\" : \"info\";\n addBreadcrumb(\n \"fetch\",\n `${method}: ${url} [${statusCode || \"pending\"}]`,\n level,\n {\n method,\n url,\n status_code: statusCode,\n ...data,\n },\n );\n};\n\n/**\n * Capture an exception and send to Sentry via HTTP API.\n * Lightweight alternative to Sentry SDK for memory-constrained extensions.\n */\nexport const captureShareExtensionException = async (error: unknown) => {\n if (!sentryConfig || !SHARE_EXTENSION_SENTRY_ENABLED) return;\n\n sessionErrorCount++;\n const session = getSessionContext();\n const errorObj = error instanceof Error ? error : new Error(String(error));\n\n try {\n await fetch(\n `https://${sentryConfig.host}/api/${sentryConfig.projectId}/store/`,\n {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-Sentry-Auth\": `Sentry sentry_version=7, sentry_key=${sentryConfig.key}`,\n },\n body: JSON.stringify({\n timestamp: Date.now() / 1000,\n platform: \"javascript\",\n environment: env.NODE_ENV,\n release: `${Application.applicationId}@${Application.nativeApplicationVersion}+${Application.nativeBuildVersion}`,\n dist: \"share-extension\", // Distinguishes share extension source maps from main app\n tags: {\n component: \"share-extension\",\n extension_type: \"share\",\n hermes: \"true\",\n session_id: session.session_id,\n },\n user: {\n id: getShareExtensionUserIdFromCache() ?? undefined,\n },\n extra: {\n session_start: session.session_start,\n session_duration: session.session_duration,\n session_error_count: session.session_error_count,\n },\n contexts: {\n device: {\n name: Device.deviceName ?? undefined,\n model: Device.modelName ?? undefined,\n manufacturer: Device.manufacturer ?? undefined,\n family: Platform.OS === \"ios\" ? \"iOS\" : \"Android\",\n arch: Device.supportedCpuArchitectures?.[0],\n simulator: !Device.isDevice,\n memory_size: Device.totalMemory ?? undefined,\n },\n os: {\n name: Platform.OS === \"ios\" ? \"iOS\" : \"Android\",\n version: Platform.Version?.toString(),\n build: Device.osBuildId ?? undefined,\n },\n app: {\n app_name: Application.applicationName ?? undefined,\n app_version: Application.nativeApplicationVersion ?? undefined,\n app_build: Application.nativeBuildVersion ?? undefined,\n app_identifier: Application.applicationId ?? undefined,\n build_type: Device.isDevice ? \"device\" : \"simulator\",\n },\n react_native: {\n js_engine: \"hermes\",\n expo: true,\n },\n },\n exception: {\n values: [\n {\n type: errorObj.name,\n value: errorObj.message,\n stacktrace: errorObj.stack\n ? { frames: parseStackTrace(errorObj.stack) }\n : undefined,\n },\n ],\n },\n breadcrumbs: breadcrumbs.slice(),\n }),\n },\n );\n } catch {\n // Silently fail - don't crash extension for error reporting\n }\n};\n\n```",
"reactions": {
"url": "https://api.github.com/repos/voytravel/voy/issues/483/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
},
"timeline_url": "https://api.github.com/repos/voytravel/voy/issues/483/timeline",
"performed_via_github_app": null,
"state_reason": "not_planned",
"pinned_comment": null
},
"repository": {
"id": 1018806750,
"node_id": "R_kgDOPLnB3g",
"name": "voy",
"full_name": "voytravel/voy",
"private": true,
"owner": {
"login": "voytravel",
"id": 213144510,
"node_id": "O_kgDODLRTvg",
"avatar_url": "https://avatars.githubusercontent.com/u/213144510?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/voytravel",
"html_url": "https://github.com/voytravel",
"followers_url": "https://api.github.com/users/voytravel/followers",
"following_url": "https://api.github.com/users/voytravel/following{/other_user}",
"gists_url": "https://api.github.com/users/voytravel/gists{/gist_id}",
"starred_url": "https://api.github.com/users/voytravel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/voytravel/subscriptions",
"organizations_url": "https://api.github.com/users/voytravel/orgs",
"repos_url": "https://api.github.com/users/voytravel/repos",
"events_url": "https://api.github.com/users/voytravel/events{/privacy}",
"received_events_url": "https://api.github.com/users/voytravel/received_events",
"type": "Organization",
"user_view_type": "public",
"site_admin": false
},
"html_url": "https://github.com/voytravel/voy",
"description": "Voy Monorepo",
"fork": false,
"url": "https://api.github.com/repos/voytravel/voy",
"forks_url": "https://api.github.com/repos/voytravel/voy/forks",
"keys_url": "https://api.github.com/repos/voytravel/voy/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/voytravel/voy/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/voytravel/voy/teams",
"hooks_url": "https://api.github.com/repos/voytravel/voy/hooks",
"issue_events_url": "https://api.github.com/repos/voytravel/voy/issues/events{/number}",
"events_url": "https://api.github.com/repos/voytravel/voy/events",
"assignees_url": "https://api.github.com/repos/voytravel/voy/assignees{/user}",
"branches_url": "https://api.github.com/repos/voytravel/voy/branches{/branch}",
"tags_url": "https://api.github.com/repos/voytravel/voy/tags",
"blobs_url": "https://api.github.com/repos/voytravel/voy/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/voytravel/voy/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/voytravel/voy/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/voytravel/voy/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/voytravel/voy/statuses/{sha}",
"languages_url": "https://api.github.com/repos/voytravel/voy/languages",
"stargazers_url": "https://api.github.com/repos/voytravel/voy/stargazers",
"contributors_url": "https://api.github.com/repos/voytravel/voy/contributors",
"subscribers_url": "https://api.github.com/repos/voytravel/voy/subscribers",
"subscription_url": "https://api.github.com/repos/voytravel/voy/subscription",
"commits_url": "https://api.github.com/repos/voytravel/voy/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/voytravel/voy/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/voytravel/voy/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/voytravel/voy/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/voytravel/voy/contents/{+path}",
"compare_url": "https://api.github.com/repos/voytravel/voy/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/voytravel/voy/merges",
"archive_url": "https://api.github.com/repos/voytravel/voy/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/voytravel/voy/downloads",
"issues_url": "https://api.github.com/repos/voytravel/voy/issues{/number}",
"pulls_url": "https://api.github.com/repos/voytravel/voy/pulls{/number}",
"milestones_url": "https://api.github.com/repos/voytravel/voy/milestones{/number}",
"notifications_url": "https://api.github.com/repos/voytravel/voy/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/voytravel/voy/labels{/name}",
"releases_url": "https://api.github.com/repos/voytravel/voy/releases{/id}",
"deployments_url": "https://api.github.com/repos/voytravel/voy/deployments",
"created_at": "2025-07-13T04:51:01Z",
"updated_at": "2026-07-18T15:45:05Z",
"pushed_at": "2026-07-20T05:52:08Z",
"git_url": "git://github.com/voytravel/voy.git",
"ssh_url": "org-213144510@github.com:voytravel/voy.git",
"clone_url": "https://github.com/voytravel/voy.git",
"svn_url": "https://github.com/voytravel/voy",
"homepage": null,
"size": 67890,
"stargazers_count": 1,
"watchers_count": 1,
"language": "TypeScript",
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": false,
"has_pages": false,
"has_discussions": true,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 35,
"license": {
"key": "mit",
"name": "MIT License",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit",
"node_id": "MDc6TGljZW5zZTEz"
},
"allow_forking": false,
"is_template": false,
"web_commit_signoff_required": false,
"has_pull_requests": true,
"pull_request_creation_policy": "all",
"topics": [],
"visibility": "private",
"forks": 0,
"open_issues": 35,
"watchers": 1,
"default_branch": "develop",
"custom_properties": {}
},
"organization": {
"login": "voytravel",
"id": 213144510,
"node_id": "O_kgDODLRTvg",
"url": "https://api.github.com/orgs/voytravel",
"repos_url": "https://api.github.com/orgs/voytravel/repos",
"events_url": "https://api.github.com/orgs/voytravel/events",
"hooks_url": "https://api.github.com/orgs/voytravel/hooks",
"issues_url": "https://api.github.com/orgs/voytravel/issues",
"members_url": "https://api.github.com/orgs/voytravel/members{/member}",
"public_members_url": "https://api.github.com/orgs/voytravel/public_members{/member}",
"avatar_url": "https://avatars.githubusercontent.com/u/213144510?v=4",
"description": ""
},
"enterprise": {
"id": 469843,
"slug": "darkmatter",
"name": "darkmatter",
"node_id": "E_kgDOAAcrUw",
"avatar_url": "https://avatars.githubusercontent.com/b/469843?v=4",
"description": "",
"website_url": "darkmatter.io",
"html_url": "https://github.com/enterprises/darkmatter",
"created_at": "2025-09-07T16:01:00Z",
"updated_at": "2026-07-07T15:59:26Z"
},
"sender": {
"login": "linear-code[bot]",
"id": 222613912,
"node_id": "BOT_kgDODUTRmA",
"avatar_url": "https://avatars.githubusercontent.com/in/1658531?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/linear-code%5Bbot%5D",
"html_url": "https://github.com/apps/linear-code",
"followers_url": "https://api.github.com/users/linear-code%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/linear-code%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/linear-code%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/linear-code%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/linear-code%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/linear-code%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/linear-code%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/linear-code%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/linear-code%5Bbot%5D/received_events",
"type": "Bot",
"user_view_type": "public",
"site_admin": false
},
"installation": {
"id": 143976268,
"node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMTQzOTc2MjY4"
}
}