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
20251016_Rails News ~Rails 8.1の足音を聴く~
Search
Masato Mori
October 15, 2025
Programming
1.4k
3
Share
20251016_Rails News ~Rails 8.1の足音を聴く~
2025/10/16に開催した RailsTokyo #1 で発表した資料です。
https://railstokyo.connpass.com/event/363339/
Masato Mori
October 15, 2025
More Decks by Masato Mori
See All by Masato Mori
20220218_Rails開発プロジェクトチームの始め方と入り方 in 銀座Rails#42
morimorihoge
3
620
20220125_令和版!RailsアプリでPDF生成するテクニック集 in 銀座Rails#41
morimorihoge
8
7.1k
それVIEWでできるよ!(Kaigi on Rails _2021_ new LT)
morimorihoge
2
170
20210827_出張!Railsウォッチ in 銀座Rails#36
morimorihoge
0
2.1k
20210730_出張!Railsウォッチ in 銀座Rails#35
morimorihoge
0
1.9k
20210618_出張!Railsウォッチ in 銀座Rails#34
morimorihoge
0
2.4k
20210521_出張!Railsウォッチ in 銀座Rails#33
morimorihoge
1
7.3k
20210423_出張!Railsウォッチ in 銀座Rails#32
morimorihoge
0
60
20210226_出張!Railsウォッチ in 銀座Rails#30
morimorihoge
0
550
Other Decks in Programming
See All in Programming
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
130
さぁV100、メモリをお食べ・・・
nilpe
0
110
Oxcを導入して開発体験が向上した話
yug1224
4
240
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
1.5k
Sans tests, vos agents ne sont pas fiables
nabondance
0
170
Agentic UI beyond Chats Architecture Patterns & Open Standards @ngMunich 05/2026
manfredsteyer
PRO
0
160
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.2k
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
1k
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
1.2k
ECR拡張スキャンでSBOMを収集して サプライチェーン攻撃の影響調査を 爆速で終わらせてみた
akihisaikeda
2
210
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
2.4k
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
380
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
540
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
820
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
380
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
190
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
310
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
710
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
310
Transcript
Rails News ~Rails 8.1の足音を聴く~ ~Structured Event Reporting解説~ ver. RailsTokyo #1
2025/10/16 森 雅智 / @morimorihoge 2025/10/16
• Web受託開発や自社サービス開発・運営をやっている会社です • TechRachoという自社技術Blogを運営しています ◦ 10年ほど前から平日毎日更新 してます ◦
https://techracho.bpsinc.jp/ • お仕事相談、転職相談、TechRachoへのご意見など気軽にどうぞ ◦ https://www.bpsinc.jp/ About Me • 森 雅智: @morimorihoge • BPS株式会社でRailsの受託開発チームをやってたり、週1大学非常勤でWeb開発を教えてたり します • Ruby/Rails歴は15年くらい。Web開発は20年くらい • 主にリモート開催時代に力尽きるまで銀座Railsを運営していました 🙏💦 • RailsTokyoではチームの力でやっていけるように強力していきます 💪 About BPS & TechRacho
About TechRacho 毎日更新の技術ブログです。Railsネタ多めなのでぜひBookmark & 購読してください😎
Rails 8.1の足音を聴く
【NEW】2025/10/15: Rails 8.1.0.rc1 リリース!
Rails 8.1の新機能(抜粋) • Active Job Continuations ◦ 大きなJobをstepごとに記述しておく ことで、一時停止・再開可能 に
• Active Record Tenanting: Codeminerの詳しいやってみた記事 ◦ テナントごとにDBを分ける 機能。現状SQLite3環境のみサポート • Action Push Native ◦ iOS/Android環境にAPNs / FCMを使ってpush通知する機能 • Lexxy (early beta): ※ちょっとデモする ◦ Action Textで現在のTrixを将来置き換えていく予定のよりリッチな WYSIWYGエディタ。PDFや動画 のプレビュー対応・”/” “@” によるイマドキのprompt / mention入力アシストなどもできるらしい • Structured Event Reporting ◦ -> 本日pickupして解説します • その他 ◦ Local CI、Markdown Rendering、Kamalの改善など 参考: https://rubyonrails.org/2025/9/4/rails-8-1-beta-1 https://blog.codeminer42.com/whats-new-in-rails-8-1-and-its-ecosystem など
Structured Event Reporting • 構造化したアプリケーションイベントをPub / Subする仕組み • Rails.eventを通じて利用することができる ◦
Event Reporterと呼ばれている機能 • ビジネスロジック的に取りたいイベントや、特定の問題調査などに利用できる • アプリケーションイベントの例 ◦ 商品を購入した ◦ 商品を閲覧した ◦ ユーザーがN日ぶりにログインした ◦ 商品のお気に入り登録数が 100を超えた
🤔ActiveSupport::Notificationsと何が違うの? • 以前からあるAS::NotificationsもPub/Subの仕組みを持っている • 今までも以下のような形でアプリケーションイベントを取ることはできた
Structured Event Reporting版
Structured Event Reporting版 Subscriber登録型に contextやtagを柔軟に設定可能に
AS::Notificationsに対する機能上の優位点 • pub / subするchannelの指定が柔軟 ◦ AS::Notificationsは文字列でしか指定できない : “sql.active_record” “enqueue_at.active_job”
◦ Structured Event Reportingはtags / contextの仕組みがあり、より柔軟な仕様が用意されている • tags / contextの指定方法が柔軟 ◦ AS::Notificationsは #instrument 呼び出し時にpayload内をすべて構築する必要がある ◦ Structured Event Reporting は #set_context でglobalな値を設定できたり、 #tagged を使ってブ ロック内でのみ当該tagを効かせるということができる ▪ before_actionやmiddlewareでcontextを設定できる
おそらくこんな使い方が想定されているのだろう(私見) • AS::Notifications ◦ これまでもログとして出力されているような Railsのシステム的な処理を扱う ◦ アプリケーションエラーや Jobの投入・実行状況などを扱う •
Structured Event Reporting ◦ よりビジネスレイヤや運用者視点でのイベントを扱う ◦ アプリケーションログとは別の LogStreamとしてCloudWatch Logsに流し、JSONログとして解析す るとか ◦ OpenTelemetryやDatadogにメトリクスを送信し、いい感じの Dashboardを作って閲覧するとか
その他気づいたこと • Loggingの置き換えではないので、JSON Logを出力したいという場合はJSON Loggerなどと組み合わせる必要がある ◦ JSONSubscriberなどを作ってsubscribeさせるイメージ • Subscriberの呼び出しは同期処理なので、重い処理を書くとレスポンス速度に影 響が出る
◦ AS::Notificationsと同じ。どうしても時間のかかる処理がしたければ Subscriber#emit 内で新しい スレッドを立てるなり、 Jobに詰むなりが必要 • tags / contextは柔軟な実装ができるが、収集・分析する側の問題もあるのでデー タ設計は慎重に ◦ contextのデータ構造を変えたら過去のデータと互換性がなくなってしまうので注意
まとめ • Rails 8.1のリリースが秒読みに入ったので、まだの人はそろそろキャッチアップ を! • 感想・リクエストなどあればXにて #railstokyo_meetup や @morimorihoge
までお 声かけください