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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
790
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
2
6.7k
Managing Database Migrations in Go Backend Systems
pyama86
0
580
新しい職場の 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
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
5k
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
100
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
260
新卒PdEのリアル
ryu1013
1
520
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
150
Jetpack Compose メカニズム
skydoves
0
480
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
2
300
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
200
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
360
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
120
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
420
FreeBSDでZabbixを動かす
kenkino
0
330
Featured
See All Featured
Bash Introduction
62gerente
615
220k
Designing for Timeless Needs
cassininazir
1
510
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
310
Into the Great Unknown - MozCon
thekraken
41
2.7k
Test your architecture with Archunit
thirion
2
2.4k
Speed Design
sergeychernyshev
33
2.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
A Modern Web Designer's Workflow
chriscoyier
699
190k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Code Review Best Practice
trishagee
74
20k
How to Ace a Technical Interview
jacobian
281
24k
Marketing to machines
jonoalderson
1
5.8k
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