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
ログ調査で分からなかった原因が、New Relicのトランザクションで一瞬で解決した話
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Sh0He1666
September 09, 2025
35
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ログ調査で分からなかった原因が、New Relicのトランザクションで一瞬で解決した話
Sh0He1666
September 09, 2025
More Decks by Sh0He1666
See All by Sh0He1666
Go×RLSで複数テナントのデータを安全に扱う/secure-data-access-with-go-rls-in-multi-tenant-environment
sh0he1666
0
1.1k
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
260
Ruling the World: When Life Gets Gamed
codingconduct
0
390
Statistics for Hackers
jakevdp
799
230k
How GitHub (no longer) Works
holman
316
150k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Odyssey Design
rkendrick25
PRO
2
860
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
620
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
The agentic SEO stack - context over prompts
schlessera
0
960
Balancing Empowerment & Direction
lara
6
1.3k
Transcript
@GROWTH VERSE Co., Ltd. ログ調査で分からなかった原因が、New Relicのトランザクションで⼀瞬で解決した話
©GROWTH VERSE Co., Ltd. GROWTH VERSE 株式会社 徳丸 翔平 •
バックエンド‧SREエンジニア • AIMSTARの安定稼働のために⽇々活動しています 2 ⾃⼰紹介 https://github.com/shohei36 琥珀くん
©GROWTH VERSE Co., Ltd. 3 課題 次のような経験、ありませんか? • ログの追加と調査を繰り返すが、バグの原因が⼀⽣わからない •
事象の再現もできず調査が難航し、暗礁に乗り上げる
©GROWTH VERSE Co., Ltd. 4 発表内容 今⽇は、そんな⾟いログ調査を終わらせてくれた、New Relicのトランザクション監視の威⼒についてお話 しします!
©GROWTH VERSE Co., Ltd. • 稀に、同じ配信予約のワーカーが複数同 時に起動する事象が発⽣ • 重複実⾏防⽌の仕組みはあるが、バグの 混⼊によって重複配信の危険性がある
5 事件の発⽣:謎の不具合 メール配信予約システムの概略図
©GROWTH VERSE Co., Ltd. 仮説ベースでコードを変更してみたり、ログの追加など試したが原因特定できず • 全テナントの配信予約を取得するところで重複発⽣? ◦ → NO
• プロデューサーが重複起動している? ◦ → NO • ワーカープールのライブラリにバグがあるかも? ◦ → NO 6 ⼀次調査:我々の戦い
©GROWTH VERSE Co., Ltd. • ログで何(What)が起きたかはわかる • しかし、なぜ(Why)起きたかまで辿り着くことができない → 点と点(ログ)はあっても、その間の線(処理の流れ)を知る必要がある
7 ログ調査の限界
©GROWTH VERSE Co., Ltd. 藁にもすがる思いでNew Relic トランザクションを導⼊ 8 New Relic
トランザクションの衝撃 https://docs.newrelic.com/jp/docs/tutorial-improve-app-performance/problematic-transactions/
©GROWTH VERSE Co., Ltd. • トランザクション ◦ ソフトウェア アプリケーション内の 1
つの論理作業単位 ◦ Webの場合、アプリケーションが Web 要求を受信してから応答が送信されるまでに発⽣するア クティビティ • セグメント ◦ アプリケーション内のトランザクションの特定の部分 • ⾔語によって実現⽅法が異なる ◦ ⾔語(Javaなど)によってはAgentを導⼊するだけで計測できるようになる ◦ (Goの場合は⼿動で計装が必要) 9 New Relic トランザクションの概要 参考: https://docs.newrelic.com/jp/docs/apm/transactions/intro-transactions/transactions-new-relic-apm/ https://docs.newrelic.com/jp/docs/apm/agents/go-agent/instrumentation/instrument-go-segments/
©GROWTH VERSE Co., Ltd. トランザクションの計装 10 New Relic トランザクションの実装例(Golang)
©GROWTH VERSE Co., Ltd. 11 New Relic トランザクションの実装例(Golang) セグメントの計装
©GROWTH VERSE Co., Ltd. 12 New Relic トランザクションの実装例(Golang) セグメントの計装(util)
©GROWTH VERSE Co., Ltd. 13 あっさり原因特定 🙌 DBコネクション取得待ちが発⽣している...!
©GROWTH VERSE Co., Ltd. 14 待望の不具合解消!🎉🎉🎉 修正リリース後、DBコネクション取得待ち(⻩⼟⾊)が解消されていることがわかる リリース🚀
©GROWTH VERSE Co., Ltd. 15 まとめ • ログは点の調査、トランザクション監視は線の調査 • 不具合調査においても、処理の可視化はかなり強⼒
• 推測するな、計測せよ (Measure, don't guess.)
©GROWTH VERSE Co., Ltd. 16 Thank you for listening !