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
71
クラウドサービスの 利用コストを削減する技術 - 円安の真南風を感じて -
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
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Amazon Qを使ってIaCを触ろう!
maruto
0
400
Outline View in SwiftUI
1024jp
1
320
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
距離関数を極める! / SESSIONS 2024
gam0022
0
280
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
110
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Ethereum_.pdf
nekomatu
0
460
ヤプリ新卒SREの オンボーディング
masaki12
0
130
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
660
Jakarta EE meets AI
ivargrimstad
0
580
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
459
33k
How GitHub (no longer) Works
holman
310
140k
Side Projects
sachag
452
42k
Navigating Team Friction
lara
183
14k
We Have a Design System, Now What?
morganepeng
50
7.2k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Language of Interfaces
destraynor
154
24k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Thoughts on Productivity
jonyablonski
67
4.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
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