Skip to content

SentryプロファイリングをUI Profilingに移行し@sentry/react-nativeをv8.11.1にアップグレード#5963

Merged
TinyKitten merged 1 commit into
devfrom
claude/fix-sentry-profiling-x4neO
May 12, 2026
Merged

SentryプロファイリングをUI Profilingに移行し@sentry/react-nativeをv8.11.1にアップグレード#5963
TinyKitten merged 1 commit into
devfrom
claude/fix-sentry-profiling-x4neO

Conversation

@TinyKitten
Copy link
Copy Markdown
Member

@TinyKitten TinyKitten commented May 12, 2026

概要

Sentry でプロファイルが取得できない事象を調査し、@sentry/react-native~7.11.0~8.11.1 にメジャーアップグレードしたうえで、Sentry 推奨の UI Profiling(継続プロファイリング)構成に切り替えた。

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

  • package.json / package-lock.json: @sentry/react-native~7.11.0 から ~8.11.1 にアップグレード。
  • index.js: 旧式の profilesSampleRate: 1.0(トランザクションベース)を廃止し、Sentry 推奨の profilingOptions ベースの UI Profiling 設定に置き換え:
    • profileSessionSampleRate: 1.0
    • lifecycle: 'trace'(サンプリングされたスパンが存在する間だけプロファイラを稼働させる)
    • startOnAppStart: true(App Start プロファイルを起動時から取得)

経緯(プロファイルが届かなかった原因)

  • 7.11.0 では Hermes プロファイラの teardown 時クラッシュ(pthread_kill SIGABRT)が未修正で、プロファイル送信が落ちることがあった(v8.10.0 で修正)。
  • iOS の UI Profiling は v7.12.0 で追加されており、7.11.0 では iOS 側がそもそも対応していなかった。
  • v8.9.1 では iOS UI Profiling オプションが silently ignored となる不具合も修正されている。
  • 設定の漏れではなく SDK バージョンに起因した既知の不具合の影響であり、最新の SDK へ追従しつつ推奨 API に乗り換えることで根治を狙う。

v8 のネイティブ最低要件(iOS 15+, Xcode 16.4+, AGP 7.4+, Kotlin 1.8+)は現行の Expo 55 / RN 0.83 環境で既に満たされており、ネイティブ側の追加変更は不要。

テスト

  • npm run lint が通ること
  • npm test が通ること
  • npm run typecheck が通ること

関連Issue

スクリーンショット(任意)


Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • エラー追跡サービスの初期化設定を更新し、セッションプロファイリング機能を有効化しました。これによりアプリケーションのパフォーマンス監視がより詳細になります。
    • エラー追跡ライブラリの依存関係をバージョン8.11.1に更新しました。

Review Change Stack

@TinyKitten TinyKitten self-assigned this May 12, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c0e963dd-1a69-40c7-8148-07d8df972939

📥 Commits

Reviewing files that changed from the base of the PR and between dea10f9 and a1b9463.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • index.js
  • package.json

📝 Walkthrough

概要

Sentry React Native ライブラリを 7.11.0 から 8.11.1 にアップグレードし、初期化設定を新しいプロファイリング API に更新しました。セッションプロファイリングとアプリ起動時トレースが有効化されています。

変更内容

Sentry プロファイリング設定アップグレード

レイヤー / ファイル 概要
Sentry ライブラリアップグレードとプロファイリング設定
package.json, index.js
@sentry/react-native を 8.11.1 にアップグレード。Sentry.init の本番設定で profilesSampleRate を廃止し、新しい profilingOptions オブジェクト(profileSessionSampleRate、lifecycle: 'trace'、startOnAppStart: true)で置き換え。

見積もりレビュー工数

🎯 2 (Simple) | ⏱️ ~8 分

🐰 Sentry の鎧を磨いて新しく
プロファイリングの光、トレースの鎖
八点へと数字は進み
アプリは起動時より見守られ
バージョン新た、信頼 upgrade!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PRタイトルは、@sentry/react-nativeのv8.11.1へのアップグレードとUI Profilingへの移行という主要な変更を正確に要約しており、変更セットと完全に関連している。
Description check ✅ Passed PR説明は必須セクションのほぼすべて(概要、変更の種類、変更内容、テスト)を含んでおり、詳細で技術的に十分な情報が記載されている。関連Issueセクションはテンプレートコメントのままだが、非必須部分として許容される。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-sentry-profiling-x4neO

Comment @coderabbitai help to get the list of available commands and usage tips.

@TinyKitten TinyKitten merged commit 326b3f3 into dev May 12, 2026
7 checks passed
@TinyKitten TinyKitten deleted the claude/fix-sentry-profiling-x4neO branch May 12, 2026 11:34
@TinyKitten TinyKitten mentioned this pull request May 12, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants