Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
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
230
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
130
もう怖くないバックグラウンド処理 Background Tasks のすべて - Hakodate.swift #1
kantacky
0
470
ヘッドジェスチャを検知して Vibe Cooking - iOSDC Japan 2025
kantacky
0
690
Other Decks in Technology
See All in Technology
Bet AI Day 2026丨AIによって本質に戻るシステムリスク管理
layerx
PRO
0
880
Genie Code ワークショップ 基礎編 / Genie-Code-Workshop-fundamental
databricksjapan
PRO
0
350
AI活用の現在地、 ちゃんと見えてますか?/XPfest-2026
visional_engineering_and_design
0
150
Kiro Crewしか勝たん!?
miu_crescent
PRO
0
180
Where Is JetBrains AI Heading- — Central CLI, Air Alpha, and the Agentic Development Stack
x5gtrn
PRO
0
120
#jawssonic2026 あの時代が悪かった ~動かなかったSageMakerと共に迎えたイベント当日~
ktkn1129
0
130
bet_ai_day_2026_session02
agenticsec
1
980
ブラウザアプリの継続的パフォーマンスモニタリング (序) / Continuous Browser Application Performance Monitoring; Act 1
moznion
0
110
Redmine 7.0で私が開発した新機能の狙いと背景
vividtone
1
110
Driving AI Adoption Using In-House GPUs to Serve Qwen
po3rin
2
450
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
110
現場に行くだけでは足りない——プロダクトエンジニアが業務の流れを捉える観点と、その鍛え方
takumiengineering
0
280
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
3
3.9k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
310
Exploring anti-patterns in Rails
aemeredith
3
490
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
360
We Have a Design System, Now What?
morganepeng
55
8.3k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
520
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
590
Product Roadmaps are Hard
iamctodd
55
13k
Un-Boring Meetings
codingconduct
0
410
A better future with KSS
kneath
240
18k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
490
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の共存