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
散らばったトレースを繋げる技術
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kazuki Obata
November 29, 2024
910
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
散らばったトレースを繋げる技術
ゆるSRE勉強会 #8
https://yuru-sre.connpass.com/event/332731/
Kazuki Obata
November 29, 2024
More Decks by Kazuki Obata
See All by Kazuki Obata
ウォンテッドリーのアラート設計と Datadog 移行での知見
donkomura
0
770
KubeCon + CloudNativeCon Japan 2025 Recap
donkomura
0
950
計装を見直してアプリケーションパフォーマンスを改善させた話
donkomura
2
520
自分だけの仮想クラスタを高速かつ効率的に作る kubefork
donkomura
0
340
ウォンテッドリーのインフラチームに加わってみて
donkomura
0
300
AWS CLI で気軽にコスト改善やってみた
donkomura
1
320
入門 KRR
donkomura
0
430
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
540
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
530
RailsConf 2023
tenderlove
30
1.6k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
460
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
420
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Color Theory Basics | Prateek | Gurzu
gurzu
1
470
Docker and Python
trallard
47
4.2k
Transcript
© 2024 Wantedly, Inc. ࢄΒͬͨτϨʔεΛܨ͛Δٕज़ ΏΔSREษڧձ #8 LT Nov. 29
- Kazuki Obata / @donkomura_
© 2024 Wantedly, Inc. ͍ͨ͜͠ͱ - ΦϒβʔόϏϦςΟͷߏཁૉʮτϨʔεʯ - όϥόϥʹͳͬͯ͠·͏ͱࠔΔ -
ͱͳΔՕॴɾϙΠϯτΛղઆ - εύϯΛܨ͛ͯτϨʔεʹ͢Δํ๏Λհ - ίʔυϕʔεͰղઆ - ֶͼ
© 2024 Wantedly, Inc. APM ͰτϨʔεܨ͕Βͳ͍... - ىͬͨ͜͜ͱ - OpenCensus
ͱ dd-trace ͷτϨʔε͕όϥόϥ - ܭͨ͠τϨʔεͱ Redis ͷτϨʔε͕όϥόϥ - ༗ޮͳใ͕ͺͬͱݟΕͳ͍☹ - Ͳ͕͔͜ɺϘτϧωοΫʹͳ͍ͬͯΔ͔ҰͰ͔Βͳ͍ - εύϯ͕όϥόϥͰௐࠪͮ͠Β͍ https://docs.datadoghq.com/ja/tracing/glossary/
© 2024 Wantedly, Inc. ղܾࡦ τϨʔείϯςΩετΛ͢Δ
© 2024 Wantedly, Inc. τϨʔείϯςΩετΛ͢Δ - τϨʔείϯςΩετͱ - τϨʔεIDɾεύϯIDɾεύϯID Λ࣋ͬͨσʔλߏ
- ಉ͡τϨʔείϯςΩετ͔Βੜ͞Εͨεύϯಉ͡τϨʔεʹଐ͢Δ - ࢠؔҡ࣋͞ΕΔ - ͷݪҼ - TraceIDͷϑΥʔϚοτ͕ҟͳΔ - τϨʔείϯςΩετΛඞཁͳՕॴͰ͍͑ͯͳ͍ - ผʑͷτϨʔείϯςΩετΛ͍ͬͯͨ
© 2024 Wantedly, Inc. ͭͳ͛ํ 1. OpenCensus ͱ ddtrace ͷτϨʔεΛܨ͛Δ
Go (dd-trace-go) ͷྫ // ϑΥʔϚοτΛ͑Δ carrier := tracer.TextMapCarrier{ tracer.DefaultTraceIDHeader: strconv.FormatUint(binary.BigEndian.Uint64(traceID[8:]), 10), tracer.DefaultParentIDHeader: strconv.FormatUint(binary.BigEndian.Uint64(spanID[:]), 10), } // ίϯςΩετͷੜ sctx, _ := tracer.Extract(carrier) // εύϯͷੜ span, ctx := tracer.StartSpanFromContext(ctx, "op1", tracer.ChildOf(sctx)) // ctx ΛͬͯଞͷεύϯΛੜ span, ctx := tracer.StartSpanFromContext(ctx, "op2", tracer.ChildOf(sctx))
© 2024 Wantedly, Inc. ͭͳ͛ํ 2. Redis ͷτϨʔεΛܨ͛Δ Redigo ͷྫ
// Redis ΫϥΠΞϯτͷ Wrapper Λ͏ pool := &redis.Pool{ Dial: func() (redis.Conn, error) { return redigotrace.Dial("tcp", "127.0.0.1:6379", redigotrace.WithServiceName("my-redis-backend"), ) }, } // ίϯςΩετΛ͍ճ͢ c.Do("SET", "food", "cheese", ctx) https://pkg.go.dev/gopkg.in/DataDog/
[email protected]
/contrib/gomodule/redigo
© 2024 Wantedly, Inc. ·ͱΊ - ཁ͢ΔʹτϨʔείϯςΩετΛ͍·Θͤྑ͍ - ಉ͡τϨʔεIDΛ͏ -
εύϯͷࢠؔ - ܨ͕ͬͯͳ͍ͱ͖τϨʔεIDΛ֬ೝ - τϨʔεID͕ҟͳ͍ͬͯͳ͍͔ - e.g. ϑΥʔϚοτ͕ҧ͏ɺencode/decode ͕ؒҧ͍ͬͯΔ - τϨʔείϯςΩετͷ͕Ͱ͖͍ͯΔ͔ - e.g. ctx ͷ͍ͯ͠ͳ͍ɺ͍ͬͯͳ͍ ࢄΒͬͨτϨʔεΛܨ͛Δ