Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
2027年のMetricKit
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kanta Oikawa
August 20, 2026
Technology
250
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
2027年のMetricKit
Kanta Oikawa
August 20, 2026
More Decks by Kanta Oikawa
See All by Kanta Oikawa
はじめてのCoreSpotlight
kantacky
0
190
もう怖くないバックグラウンド処理 Background Tasks のすべて - Hakodate.swift #1
kantacky
0
560
ヘッドジェスチャを検知して Vibe Cooking - iOSDC Japan 2025
kantacky
0
720
Other Decks in Technology
See All in Technology
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
720
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
今さら理解するウェブフォントver.2026
takanorip
3
760
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
760
Local CI × GitHub Actions
gogutan
2
170
Browser Spec: Testing Hotwire with Ruby
takahashim
1
120
Refining Active Record
shugo
0
150
その Valkey 使いこなしていますか?
onk
PRO
5
1.5k
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
470
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
320
⾮構造化データを価値に変える AI エージェント基盤とその組織
ivry_presentationmaterials
0
190
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
8
3.1k
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
GraphQLとの向き合い方2022年版
quramy
50
15k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
Utilizing Notion as your number one productivity tool
mfonobong
4
620
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Ethics towards AI in product and experience design
skipperchong
2
430
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Transcript
2027年のMetricKit potatotips #96 Kanta Oikawa - 2026/08/20
2 自己紹介 Kanta Oikawa - かんたっきー • 公立はこだて未来大学 修士2年 •
修論を書き終えれば来年からiOSエンジニア • Twitter : @kanta̲cky
3 MetricKit OSが集計するメトリクス/診断をレポートとして受け取る
4 MetricKit iOS 13 - iOS 26 • MXMetricManagerSubscriber を実装
• デリゲートメソッドでレポート受け取る • メトリクス MXMetricPayload • 起動時間、ハング、CPU/GPU/メモリ/ディスク書き込み/ネットワーク転送量、電力 • 独自区間のメトリクス MXSignpostMetric • 診断 MXDiagnosticPayload(iOS 14+) • クラッシュ/ハング/ディスク書き込み例外/CPU例外、コールスタック
5 MetricKit iOS 13 - iOS 26 class AppMetrics: NSObject,
MXMetricManagerSubscriber { func receiveReports() { let manager = MXMetricManager.shared manager.add(self) } func pauseReports() { let manager = MXMetricManager.shared manager.remove(self) } // Receive daily metrics. func didReceive(_ payloads: [MXMetricPayload]) { // Process metrics. } } // Receive diagnostics immediately when available. func didReceive(_ payloads: [MXDiagnosticPayload]) { // Process diagnostics. }
6 MetricKit iOS 27+ • AsyncStreamでレポートを受け取る • メトリクス MetricReport •
診断 DiagnosticReport • どちらのレポートもCodableに準拠
7 MetricKit iOS 27+ import MetricKit let manager = MetricManager()
Task { for await report in manager.metricReports { process(report) } } Task { for await report in manager.diagnosticReports { process(report) } }
8 StateReporting 状態遷移の報告を受けてメトリクスを状態ごとに集計する
9 StateReporting iOS 27+ • アプリ全体のスクロールヒッチが 15ms/s • タブAのスクロールヒッチは 1ms/s、タブBのスクロールヒッチは
71ms/s • タブBの修正が必要であることがわかる
10 StateReporting ReportableMetadata import StateReporting @ReportableMetadata struct GraphicsSettings { let
graphicsQuality: String let engineVersion: String @ReportableMetadataKey("api") let graphicsAPIName: String @ReportableMetadataIgnored let localCacheID: String } @ReportableMetadata struct GameplayVolatileMetadata { let playerHealth: Int }
11 StateReporting 状態遷移の報告とメタデータのアップデート let gameplayReporter = StateReporter.reporter( for: "com.mygame.gameplay", stableMetadata:
GraphicsSettings.self, volatileMetadata: GameplayVolatileMetadata.self ) gameplayReporter.reportTransition( to: "Playing", stableMetadata: GraphicsSettings( graphicsQuality: "High", engineVersion: "1.2.3" ), volatileMetadata: GameplayVolatileMetadata(playerHealth: 100) ) gameplayReporter.reportVolatileMetadataUpdate( GameplayVolatileMetadata(playerHealth: 75) )
12 デバッグ • Xcode 27から実機でアプリを起動 • XcodeのDebug > MetricKit >
Simulate MetricKit Payloads • ダミーのレポートを受け取ることができる • 本番と同じレポートは取得できない
13 デバッグ Xcode 26 と Xcode 27 の Debug メニュー
14 押さえておきたいポイント • レポートを取りこぼさないようにアプリ起動直後に購読を開始する • 受信タイミングはシステム依存 • デバッグには実機が必要
15 他のツールとの比較 Instruments Xcode Organizer MetricKit Firebase Performance Datadog RUM
計測できる場所 開発者端末 ユーザー端末 ユーザー端末 ユーザー端末 ユーザー端末 データソース OS OS OS SDK SDK 対象ユーザー 開発者自身 解析を共有をON 解析を共有をON すべて すべて リアルタイム リアルタイム リアルタイム性 即時 数日遅れ メトリクス=日次 診断=即時 粒度 関数・スレッド 集計 端末・日・状態 トレース・画面 セッション わかること なぜ遅いか 遅いという事実 どの状態で遅いか どの処理が遅いか 誰がいつ遅いか 無料 従量(高い) 有り 有り コスト 無料 無料 無料 送信先は自前 オーバーヘッド 有り ゼロ ほぼゼロ
16 References • MetricKit | Apple Developer Documentation • StateReporting
| Apple Developer Documentation • Meet the new MetricKit - WWDC26
17 新旧MetricKitの共存