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
93
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
120
kanazawa.go 2025.07.27
tabe
0
100
ランドネットLT会.pdf
tabe
0
44
Tavinikkiyとかいう構想半年、開発2ヶ月みたいなプロダクトを個人開発している話
tabe
0
40
テテミート 2024.11.22
tabe
0
44
Genericsについて改めて学んでみた
tabe
0
83
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
730
Writing Fast Ruby
sferik
630
63k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.3k
Building Applications with DynamoDB
mza
96
7.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
560
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静聴ありがとうございま した!