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
900
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
760
KubeCon + CloudNativeCon Japan 2025 Recap
donkomura
0
940
計装を見直してアプリケーションパフォーマンスを改善させた話
donkomura
2
510
自分だけの仮想クラスタを高速かつ効率的に作る kubefork
donkomura
0
340
ウォンテッドリーのインフラチームに加わってみて
donkomura
0
300
AWS CLI で気軽にコスト改善やってみた
donkomura
1
320
入門 KRR
donkomura
0
420
Featured
See All Featured
Navigating Team Friction
lara
192
16k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
500
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
240
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Documentation Writing (for coders)
carmenintech
77
5.5k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
620
The agentic SEO stack - context over prompts
schlessera
0
920
Writing Fast Ruby
sferik
630
63k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
520
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
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 ͷ͍ͯ͠ͳ͍ɺ͍ͬͯͳ͍ ࢄΒͬͨτϨʔεΛܨ͛Δ