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
ペパボOpenTelemetry革命
Search
Kazuhiko Yamashita
May 09, 2024
Programming
2.8k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ペパボOpenTelemetry革命
社内のイベントでお話しました
Kazuhiko Yamashita
May 09, 2024
More Decks by Kazuhiko Yamashita
See All by Kazuhiko Yamashita
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
2.6k
継続的な負荷検証を目指して
pyama86
3
1.8k
成長期における、 ユーザー領域の複雑さと 整備の進め方
pyama86
1
820
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
2
6.7k
Managing Database Migrations in Go Backend Systems
pyama86
0
600
新しい職場の CI が 20 分かかっていたらあなたならどうする?
pyama86
2
1.6k
事業を差別化する技術を生み出す技術
pyama86
4
2.4k
Re:Define 可用性を支える モニタリング、パフォーマンス最適化、そしてセキュリティ
pyama86
9
11k
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
2.2k
Other Decks in Programming
See All in Programming
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
330
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.2k
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
140
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
5.9k
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
430
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
370
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
250
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
220
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
5.3k
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
270
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
670
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
33
14k
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
860
Leo the Paperboy
mayatellez
10
2.3k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
720
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
900
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
430
Raft: Consensus for Rubyists
vanstee
142
7.7k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
500
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
380
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Transcript
ϖύϘOpenTelemetryֵ໋ ʙ͜ͷલMOROHAΈͯେ߸ٽ͠·ͨ͠ʙ
ࢁԼ!QZBNB (.0ϖύϘٕज़ج൫νʔϜ γχΞɾϓϦϯγύϧ ɹΩϟϯϓɺཱྀߦɺώϧτϯ८ΓɺιϫχΤ८Γ 1SPYZαʔό։ൃɺ0QFO5FMFNFUSZ
45/4 -JOVY/444FSWFS TUOTKQ
None
ࠓ͢͜ͱ OpenTelemetry֓ཁ OpenTelemetryΛಋೖ͖͔͚ͨͬ͠ OpenTelemetryಋೖঢ়گ ࠓޙͷల
🍉🌴🏄 GoConference’19 🏄🌴🍉 6 0QFO5FMFNFUSZ ֓ཁ
OpenTelemetry چདྷɺ4BB4044͝ͱʹ࣮͞Ε͍ͯͨςϨϝτϦσʔλͷඪ४Խ IUUQTDMPVEOBUJWFEBZTKQPZ https://opentelemetry.connpass.com/
ςϨϝτϦσʔλ “ςϨϝτϦσʔλɺΦϒβʔόϏϦςΟΛ࣮ݱ͢ΔͨΊʹγεςϜ ιʔε͔Βऩू͞ΕΔग़ྗΛࢦ͠·͢ɻ͜ΕΒͷग़ྗΛ౷߹తʹੳ͢ Δ͜ͱʹΑΓɺࢄڥͰͷγεςϜؒͷؔґଘ͕ؔΘ͔Γ· ͢ɻओʹ༻͞ΕΔσʔλΫϥε ϩάɺϝτϦΫεɺτϨʔεͷ3ͭͰɺ͜Ε ʮΦϒβʔόϏϦςΟͷ3ͭͷபʯͱݺΕ·͢ɻ” https://www.splunk.com/ja_jp/data-insider/what-is-opentelemetry.html ΑΓҾ༻
ΦϒβʔόϏϦςΟ ΦϒβʔόϏϦςΟɾΤϯδχΞϦϯά 6PΑΓҾ༻ “؆୯ʹݴ͏ͱɺࢲ͕ͨͪߟ͑ΔιϑτΣΞγεςϜͷ ʮΦϒβʔόϏϦςΟʯͱɺγεςϜ͕ͲͷΑ͏ͳঢ়ଶʹͳͬͨͱ͠ ͯɺͦΕ͕ͲΜͳʹ৽ͰحົͳͷͰ͋ͬͯɺͲΕ͚ͩཧղ͠આ໌ Ͱ͖Δ͔Λࣔ͢ईͰ͢ɻ·ͨɺͦͷΑ͏ͳ৽Ͱحົͳঢ়ଶʹରͯ͠ ɺࣄલʹσόοάͷඞཁੑΛఆٛͨ͠Γ༧ଌͨ͠Γ͢Δ͜ͱͳ͘ɺ γεςϜͷঢ়ଶσʔλͷ͋ΒΏΔσΟϝϯγϣϯͦΕΒͷΈ߹Θͤʹ ͍ͭͯΞυϗοΫʹௐࠪ͠ɺΑΓσόοά͕ՄೳͰ͋ΔΑ͏ʹ͢Δඞཁ͕
͋Γ·͢ɻ͠ɺ৽͍͠ίʔυΛσϓϩΠ͢Δඞཁ͕ͳ͘ɺͲΜͳ৽Ͱ حົͳঢ়ଶͰཧղͰ͖ΔͳΒɺΦϒβʔόϏϦςΟ͕͋Δͱݴ͑·͢ɻ
https://opentelemetry.io/blog/2024/pro fi ling/
OpenTelemetry https://opentelemetry.io/docs/ ֤ݴޠͷSDK ࣗಈܭɺखಈܭ ϛυϧΣΞ͔Β ςϨϝτϦσʔλΛ ग़ྗ
OpenTelemetry https://opentelemetry.io/docs/ ඪ४Խ͞Εͨϓϩτίϧʹ ରԠͨ͠ΤʔδΣϯτ
OpenTelemetry https://opentelemetry.io/docs/collector/ GoͰ࣮͞ΕͨόΠφϦ͕ɺReceivers,Processors,ExportersΛ࣮ߦ
OpenTelemetry https://opentelemetry.io/docs/ 4BB4 ϗετ͞Εͨ044 ࠩ͠ସ͑Մೳ
OpenTelemetryΛ ಋೖ͖͔͚ͨͬ͠
None
͓Θ͔ΓͩΖ͏͔ʁ https:// fi nance.yahoo.co.jp/quote/USDJPY=FX?styl=cndl&frm=mnthly&trm=mnthly&ovrIndctr=sma%2Cmma%2Clma
ϖύϘͷࣄ ࢄτϨʔγϯά͕ະಋೖ ࢹαʔϏε͕MackerelͱPrometheusͰڞଘ
MackerelͱPrometheus Mackerel Prometheus ຊ൪αʔόͷVM Managed Service Kubernetes Control Plane ࣾαʔϏεͷVM
Kubernetes Node Monitor Servers OpenTelemetryਪਐલ ֎ܗࢹ ϓϥΠϕʔτΫϥυͷHW
MackerelͱPrometheus Mackerel Prometheus ຊ൪αʔόͷVM Managed Service Kubernetes Control Plane ࣾαʔϏεͷVM
Kubernetes Node Monitor Servers Otel CollecotrΛ͍ΕΔͳΒɺ͜͏ͨ͠΄͏͕ແବ͕ͳ͍ ֎ܗࢹ ϓϥΠϕʔτΫϥυͷHW ຊ൪αʔόͷVM
OpenTelemetryಋೖঢ়گ
ίϯϙʔωϯτ VM k8s Metrics ̋ ̋ Trace ̋ ̋ Log
˚ ˚ OpenTelemetryಋೖঢ়گ ̋ϓϩμΫγϣϯͰಋೖࡁΈ ˚લճ.FFUVQͰͨ͠ͱ͖ΑΓਐḿ
Metrics
Metrics ϗετͷϦιʔεhostmetricsͰऔಘ ɹVMͦΕͧΕotel collectorΛΠϯετʔϧ ɹk8sDaemonSetͰ/Λmount receivers: hostmetrics: collection_interval: 1m scrapers:
cpu: metrics: system.cpu.utilization: enabled: true load: metrics: system.cpu.load_average.1m: enabled: true system.cpu.load_average.5m: enabled: true system.cpu.load_average.15m: ...
Metrics %BTICPBSE(JU)VCͰϝτϦΫε໊Ͱൃ۷ͨ͠ https://ten-snapon.com/archives/2983
Metrics 4%,Λར༻ͯ͠ϝτϦΫεΛܭ͍ͯ͠Δ https://ten-snapon.com/archives/2983 if req.Method == http.MethodPost && strings.Contains(req.RequestURI, “cartin")){
if err == nil && res.StatusCode >= 200 && res.StatusCode < 300 { r.successCounter.Add(context.Background(), metric.WithAttributes(semconv.HostName(requestURL.Host))) } else { r.failCounter.Add(context.Background(), 1, metric.WithAttributes(semconv.HostName(requestURL.Host))) } }
Trace
Trace k8sͷμογϡϘʔυͱͯ͠GrafanaΛಋೖࡁΈ k8sͷϩάݕࡧʹGrafana Loki + S3ΛಋೖࡁΈ (SBGBOB5FNQPΛ࠾༻
Trace otelcol k8s DataCenter Tempo pod VM otelcol app VMͷTraceOtel
CollectorΛ ܦ༝ͯ͠ɺk8sͷTempo
΄ͱ͠ΔϚΠΫϩαʔϏεײ
΄ͱ͠ΔϚΠΫϩαʔϏεײ
Log
طଘͷϩάύΠϓϥΠϯ ϩάͷϥΠϑλΠϜʹ߹ΘͤͨετΞʹ֨ೲ
Apache Kafka LBGLBDMVTUFS /var/log/audit.log LBGLBCSPLFS BVEJUMPH UPQJD LBGLBCSPLFS TZTMPH UPQJD
ϩά͝ͱʹτϐοΫΛ͚͍ͯΔ /var/log/syslog
Kafka Exporter 5PQJD͕ݱঢ়ܾΊଧͪͬΆ͍ https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/kafkaexporter
Kafka Exporter ͜͏͍͏ײ͡Ͱॻ͚͍ͨ
ͳΜͱॻ͚·͢!!1
ࠓޙͷల Self Hosted APM ܭଌ͔ΒվળͷαΠΫϧΛճ͢ OpenTelemetryͷߩݙ
Self Hosted APM APMͷՄ༻ੑߴ͘ͳ͍͍ͯ͘ͷͰɺ ӡ༻Ͱ͖ΔͳΒSelf HostedͰ͍͍ ݱࡏSentryΛධՁத
Elastic APMΊͨ ҎલDockerͰىಈͯͦ͜͠ʹϝτϦΫεΛૹ Δ͚͕ͩͩͬͨɺAgentͷΠϯετʔϧ͕ඞཁʹ ͳͬͨΓɺҠߦɺESɺkibanaͷϝϯςίετ͕ ͍ͱݴ͑ͳ͍
ܭଌ͔ΒվળͷαΠΫϧΛճ͢ ܭଌͰ͖ΔΑ͏ʹͳ͕ͬͨɺܭଌͰ͖͍ͯΔ͔ผ ܭଌͰ͖ͨͱͯ͠ɺվળͰ͖Δ͔ผ πʔϧͷڭҭɺϋϯζΦϯ ϘτϧωοΫͷಛఆɺղফ
ܭଌ͔ΒվળͷαΠΫϧΛճ͢
永遠のN+1 net.ipv4.tcp_max_syn_backlog Kubernetes Scheduler 突然のYahooトピックス 特定のバージョンだけで取られる謎のロック Slow Query
ܭଌ͔ΒվળͷαΠΫϧΛճ͢ վળʹ͍Ζ͍ΖͳεΩϧɺ͕ࣝඞཁ σʔλϕʔε: ΫΤϦύϑΥʔϚϯεɺύϥϝʔλʔνϡʔχϯά OS/Kernel: ωοτϫʔΫɺύϥϝʔλʔɺCPUɺϝϞϦʔ ιϑτΣΞ։ൃ: ܭࢉྔɺϦόʔεΤϯδχΞϦϯά ใऩूೳྗ: GitHub
IssueɺThe Linux Kernel ArchivesɺX
ܭଌ͔ΒվળͷαΠΫϧΛճ͢ ͠ΐ͏ͳ͍ɺΘΕͳ͍ɺҙຯ͕ͳ͍ ͦΜͳͷͰ͍͍ɺͱʹ͔͘ॻ͘͜ͱͰ ॻ͚ΔΑ͏ʹͳΓɺؾ͕͍ͭͨΒເͷதͰ ઃܭ͢ΔΑ͏ʹͳΔ
OpenTelemetryͷߩݙ OpenTelemetry(collector)ͷ࣮ൣғͱ͍ͯ receiver,exporter,processor͝ͱʹϝϯςφ͕͍ͯɺ·ΔͰ৫ͷΑ͏ ࣮ࢀߟʹͳΔ͜ͱ͕ଟ͘ɺֶͼͷػձʹͳΔ
ͳΜͱɺ ೖࣾͨ͠Βશ෦ Ε·͢ʂʂ1
܅PUFMʹͳΒͳ͍͔ʁ ࠷৽ͷ࠾༻ใΛνΣοΫˠ !QC@SFDSVJU