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
GoConferenceMini2026inSendai_-_2026.02.21.pdf
Search
o-ga
February 21, 2026
21
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GoConferenceMini2026inSendai_-_2026.02.21.pdf
o-ga
February 21, 2026
More Decks by o-ga
See All by o-ga
GoConnect#9 2025.08.19
tabe
0
89
kanazawa.go 2025.07.27
tabe
0
72
ランドネットLT会.pdf
tabe
0
23
Tavinikkiyとかいう構想半年、開発2ヶ月みたいなプロダクトを個人開発している話
tabe
0
19
テテミート 2024.11.22
tabe
0
16
Genericsについて改めて学んでみた
tabe
0
58
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
210
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
310
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
Prompt Engineering for Job Search
mfonobong
0
340
Navigating Team Friction
lara
192
16k
Paper Plane (Part 1)
katiecoart
PRO
0
9k
Navigating Weather and Climate Data
rabernat
0
220
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
First, design no harm
axbom
PRO
2
1.2k
Transcript
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve Speaker: Taichi Abe Go.1.26の runtime/metricsが 便利そうな件(?)
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 自己紹介 • 阿部 太一 @o-ga09 • 仕事:株式会社ワクト • 趣味:Goで個人開発、山本彩の推し 活、ハイキュー!! の推し活 最推しは、孤爪研磨だけど、 宮城勢での推しは、月島蛍と日向翔陽!
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 目次 1. なぜ導入のされるのか 2. 既存のruntimeメトリクス取得(ReadMemStatsなど)の課題点 3. どういう機能か?何ができるのか? 4. 新しいruntime/metricsパッケージの基本概念とGo 1.26で追加されたメトリクス群の 紹介 5. APIの使い方 6. うれしくなること 7. まとめ 8. デモ的な何か
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve ⚠ 前提 • LTなので、導入部分のみとなります • Go初心者〜中級者くらいの人間の感想です
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 1. なぜ導入のされるのか 1. 同リリースで追加された「goroutine リークプロファイル」との連携 2. Green Tea GC の導入によるオブザーバビリティ強化の必要性 3. runtime/metrics パッケージの継続的な拡充方針
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 2. 既存のruntimeメトリクス取得の課題点や要望 などは? 1. MemStats のようにスケジューラも監視したい 2. num-active-goroutines / num-cpu という比率でアプリの過負荷を検知 したい 3. メトリクスが増えすぎて何を使えばよいかわからない問題
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 3. どういう機能か?何ができるのか? • 以前はpprofに頼るしかなかった、goroutineやOSスレッドの状態監視をruntimeパッ ケージで一括で確認できるようになった
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 4. 新しいruntime/metricsパッケージ の基本概念とGo 1.26で追加されたメト リクス群の紹介
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 復習:runtime/metricsとは? • Go ランタイム内部の状態をプログラムから直接読み取るための標準 API です。Go 1.16 で導入された • 読み取った値は metrics.Value として返され、必ず Kind を確認してから 取り出す必要がある • 複数のメトリクスを一度の呼び出しでまとめて取得する
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 一覧 メトリクス 内容 /sched/goroutines-created:goroutines 生成されたgoroutineの総数 /sched/goroutines/not-in-go:goroutines 行中またはブロックされている goroutineの数 /sched/goroutines/runnable:goroutines 実行準備可能状態の gorutineの数 /sched/goroutines/running:goroutines 実行中のgorutineの数 /sched/goroutines/waiting:goroutines 実行待ち中のgoroutineの数 /sched/threads/total:threads GoRuntimeが持っている現在の OSスレッド数 全量
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 5. APIの使い方 • func Read(m []Sample) を呼ぶのみ!シンプル! ◦ このパッケージに定義された関数はこれ1つ!分かりやすい!
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve APIの使い方例
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve https://go.dev/play/p/ko_jEzD432O
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 7. うれしくなること • スケジューラの状態をより細かく・リアルタイムに把握できるようになりました! ◦ 特に、goroutineの状態監視 ◦ 総数、実行中数、待ち数 以上
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve なぜ、タイトルに(?)をつけたのか?
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve • 全員にすぐに役に立つものではない • ライブラリ側で対応すればそれでいい • あったら便利!なものではある
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve 8. まとめ • gcへ変更が入ったので、よりシステムの状態を詳細に監視できるようになったの は、ありがたい • リリースノートに少ししか書かれていない変更でもIssueをたどると数年越しの導 入みたいな機能がたくさんある • runtimeパッケージは詳細なメトリクスが見ることができるし、これからも拡充方 針らしいのでもっと勉強したい
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve デモ https://github.com/o-ga09/goconmini2026
Go Conference min 2026 in Sendai © 2026 o-ga09 All
rights reserve slides made by k1LoW/deck The Go gopher was designed by Renée French. Go静聴ありがとうございま した!