Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ペパボOpenTelemetry革命
Search
Kazuhiko Yamashita
February 15, 2024
Programming
0
920
ペパボOpenTelemetry革命
OpenTelemetry Meetup #2でお話しました。
Kazuhiko Yamashita
February 15, 2024
Tweet
Share
More Decks by Kazuhiko Yamashita
See All by Kazuhiko Yamashita
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
Tuning GraphQL on Rails
pyama86
2
1.2k
ttlcacheのここがスゴい
pyama86
1
72
クラウドサービスの 利用コストを削減する技術 - 円安の真南風を感じて -
pyama86
3
470
実践ARMアーキテクチャ移行
pyama86
2
2.2k
リモートワーク時代の守護神 PHP開発者のためのセキュリティ強化術
pyama86
3
1k
実践DevSecOps~クラウドネイティブとオンプレミスの間から~
pyama86
1
65
ペパボOpenTelemetry革命
pyama86
2
2k
Site Reliability Engineering for GMO
pyama86
10
1.3k
Other Decks in Programming
See All in Programming
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
910
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Jakarta EE meets AI
ivargrimstad
0
600
Better Code Design in PHP
afilina
PRO
0
120
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
33
2.9k
A better future with KSS
kneath
238
17k
Being A Developer After 40
akosma
86
590k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Side Projects
sachag
452
42k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Why Our Code Smells
bkeepers
PRO
334
57k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Navigating Team Friction
lara
183
14k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Transcript
ϖύϘOpenTelemetryֵ໋ ʙډञ͚ͩͷҙؾࠐΈ͔͋͠Γ·ͤΜฤʙ
ࢁԼ!QZBNB (.0ϖύϘٕज़ج൫νʔϜ γχΞɾϓϦϯγύϧ ɹΩϟϯϓɺཱྀߦɺώϧτϯ८ΓɺιϫχΤ८Γ 1SPYZαʔό։ൃɺ0QFO5FMFNFUSZ
45/4 -JOVY/444FSWFS TUOTKQ
None
None
ࠓ͢͜ͱ • Πϯϑϥߏ֓ཁ • OpenTelemetryಋೖঢ়گ • ϩάΛͲ͏͢Δ͔ΛܾΊ͔Ͷ͍ͯΔ
Πϯϑϥߏ֓ཁ
Πϯϑϥߏ֓ཁ 0QFO4UBDL #BSFNFUBM "84 IFSPLV (PPHMF$MPVE શαʔϏε߹ܭͰ7.ن ϗεςΟϯάܥͷαʔϏεɺ֤छج൫Ͱར༻ &,4
3%4 &MBTUJDYYYܥͷϚωʔδυαʔϏεΛத৺ʹར༻ (,& #JH2VFSZΛத৺ʹ"84ͷ%3ɺσʔλΤϯδχΞϦϯάͷج൫ͱͯ͠ར༻
0QFO4UBDL 0QFO4UBDLͰཧ͢Δ7.ͷ্ʹ ࣗࣾ։ൃͷΤϯδϯΛར༻ͯ͠ ,VCFSOFUFTΛσϓϩΠ ,VCFSOFUFT 0QFO4UBDL #BSFNFUBM #BSFNFUBM #BSFNFUBM 7.
7. 7. ,VCFSOFUFT $POUBJOFS $POUBJOFS $POUBJOFS
OpenTelemetryಋೖঢ়گ
ίϯϙʔωϯτ VM k8s Metrics ̋ ̋ Trace ̋ ̋ Log
˚ ˚ OpenTelemetryಋೖঢ়گ ̋ϓϩμΫγϣϯͰಋೖࡁΈ ˚པΉɺ୭͔ԶΛॿ͚ͯ͘Ε
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
Mackerel͔ΒͷҠߦ • چདྷVMMackerelɺk8sPrometheusͰࢹ͍͕ͯͨ͠ɺotelಋೖΛܖػʹ Prometheusू͢Δ(͍ͯ͘͠ɺ͍͖͍ͯͨ͠ɺཔΉʂʂ୭͔ʂʂ) • Mackerelͷcheck pluginࢹɺmetrics pluginࢹ ࡞ͷmackerel-checks-exporterͰPrometheusͷϝτϦΫεͱม
mackerel-checks-exporter Mackerelͷagent con fi gΛݩʹɺ νΣοΫࢹɺϝτϦΫεΛऩूͯ͠ɺ :9111/metricsͰެ։ receivers: prometheus: con
fi g: scrape_con fi gs: - job_name: 'mackerel-checks-exporter' metrics_path: /metrics scrape_interval: 1m static_con fi gs: - targets: - "127.0.0.1:9111"
Trace
Trace k8sͷμογϡϘʔυͱͯ͠GrafanaΛಋೖࡁΈ k8sͷظؒͷϩάݕࡧʹGrafana LokiΛಋೖࡁΈ (SBGBOB5FNQPΛ࠾༻
Trace otelcol k8s DataCenter Tempo pod VM otelcol app ࣗࣾͰ։ൃ͍ͯ͠Δk8s
engine͕ ࢹελοΫΛࣗಈΠϯετʔϧ PrometheusAlertManager Grafana Grafana Tempo Grafana Loki
Trace 5SBDFΛಋೖͨ͠ߏ go proxy server go api server rails api
MySQL Radis the other rails api
Trace (Pͷࣗಈܭ propagationΛ໌ࣔతʹఆٛ͢Δඞཁ͕͋Δ http/sql/redisͳͲࣗಈܭ͕උ͞Ε͍ͯΔͷͰɺwrap͢Δ͚ͩͰOK
Trace 3VCZPO3BJMTͷࣗಈܭ جຊgemΛΠϯετʔϧͯ͠ॳظԽ͢Δ͚ͩ
None
ೋਲ͍Ζ͘ͳ͜ͱ͕ͳ͍ ېञͩʂېञʂʂʂ
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 ͜͏͍͏ײ͡Ͱॻ͚͍ͨ
Log & Trace 5SBDF*%Ͱ-PHͱ5SBDFΛ࿈ܞ
Log & Trace 5SBDF*%Ͱ-PHͱ5SBDFΛ࿈ܞ
Log & Trace 5SBDF*%Ͱ-PHͱ5SBDFΛ࿈ܞ
ͬͯΈͯΘ͔ͬͨ͜ͱ • otel collectorʹू͢Δ͚ͩͰɺotelϓϩτίϧͰநԽ͞ΕΔͷͰ ࢥͬͨΑΓγϯϓϧʹ༷ʑ͕ίϯτϩʔϧͰ͖Δ • ֤ݴޠͷ։ൃऀɺcontribͷ։ൃऀͷํʑͷߩݙͷ͓ӄͰɺઃఆॻ͚ͩ͘ Ͱେମ͕ಈ͘
ࠓޙ͍͖͍ͬͯͨ͜ͱ • otel collectorΛ࣠ʹɺςϨϝτϦσʔλͷऩूɺٕज़ΛҰݩԽͯ͠ɺ ࣾͰϊϋΛڞ༗ͭͭ͠ɺϨόϨοδΛޮ͔͍ͤͨ • MetricsͷετΞPrometheusʹ·ͱΊ͍ͨ • LogͷपΓexporterΛ࡞Δ͔ɺίϛϡχςΟ͔ΒԠ͕͋Εͯ͠PR ͍͖͍͛ͯͨ(ͳΜ͔collectorଆͰେ͖͍มߋ͕ඞཁͳؾ͢Δ)
܅PUFMʹͳΒͳ͍͔ʁ ࠷৽ͷ࠾༻ใΛνΣοΫˠ !QC@SFDSVJU