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
GoConferenceMini2026inSendai_-_2026.02.21.pdf
Search
o-ga
February 21, 2026
80
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
110
kanazawa.go 2025.07.27
tabe
0
94
ランドネットLT会.pdf
tabe
0
41
Tavinikkiyとかいう構想半年、開発2ヶ月みたいなプロダクトを個人開発している話
tabe
0
37
テテミート 2024.11.22
tabe
0
37
Genericsについて改めて学んでみた
tabe
0
78
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
Rails Girls Zürich Keynote
gr2m
96
14k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Building an army of robots
kneath
307
46k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
My Coaching Mixtape
mlcsv
0
310
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静聴ありがとうございま した!