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
信頼性を支えるテレメトリーパイプラインの構築 / Building Telemetry Pip...
Search
ymotongpoo
January 26, 2025
Technology
10k
10
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
信頼性を支えるテレメトリーパイプラインの構築 / Building Telemetry Pipeline with OpenTelemetry
ymotongpoo
January 26, 2025
More Decks by ymotongpoo
See All by ymotongpoo
サンプリングは統計学である: 数理的根拠に基づき、オブザーバビリティのコストと精度を両立する
ymotongpoo
12
8.7k
Loadbalancing exporter internals
ymotongpoo
2
210
サンプリングは「作る」のか「使う」のか? 分散トレースのコストと運用を両立する実践的戦略 / Why you need the tail sampling and why you don't want it
ymotongpoo
4
1.9k
生成AI時代の開発と運用 / Dev and Ops in Gen AI era
ymotongpoo
9
5k
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
12
12k
プロファイルとAIエージェントによる効率的なデバッグ / Effective debugging with profiler and AI assistant
ymotongpoo
1
2k
Goのビルドシステムの変遷 / The history of Go's build system
ymotongpoo
15
13k
今日から始めるpprof / Pprof workshop for beginners
ymotongpoo
8
11k
Amazon CloudWatchのメトリクスインターバルについて / Metrics interval matters
ymotongpoo
6
600
Other Decks in Technology
See All in Technology
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
380
IoTハンズオンの舞台裏
shirouz
2
150
現場に行くだけでは足りない——プロダクトエンジニアが業務の流れを捉える観点と、その鍛え方
takumiengineering
0
310
スクラムで身についていた動き方を、XPで捉え直してみた
codmoninc
PRO
1
250
AI時代におけるプロダクト横断勉強会の設計
zozotech
PRO
0
160
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
3
870
動画配信アプリでの Engage SDK 導入 — TVer Android が Play ストアにコンテンツを届けるまで
techtver
PRO
0
130
Driving AI Adoption Using In-House GPUs to Serve Qwen
po3rin
2
460
データエンジニアの困りごとをDevinと一緒に解消する
10xinc
2
840
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
0
270
Genie Code ワークショップ 応用編 / Genie-Code-Workshop-advanced
databricksjapan
PRO
0
360
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
120
Featured
See All Featured
HDC tutorial
michielstock
2
850
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
450
KATA
mclloyd
PRO
35
15k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
560
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Skip the Path - Find Your Career Trail
mkilby
1
220
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
410
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Odyssey Design
rkendrick25
PRO
2
800
Transcript
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Trademark. 信頼性を⽀える テレメトリーパイプラインの構築 システム構成に応じた選択と実装の考慮点 ⼭⼝ 能迪 @ymotongpoo S R E K A I G I 2 0 2 5 アマゾンウェブサービスジャパン合同会社 シニアデベロッパーアドボケイト
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. ⾃⼰紹介 ⼭⼝ 能迪(やまぐち よしふみ) 専⾨領域 • オブザーバビリティ • SRE全般 翻訳 • 『⼊⾨OpenTelemetry』『SREをはじめよう』他多数 2 @ymotongpoo 2025年1⽉23⽇発売
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. 1. OpenTelemetryを⽤いたテレメトリーパイプラインの主要素 2. OpenTelemetryを⽤いたテレメトリーパイプラインの主要パターン 3. 各パターンにおける検討事項 4. OpenTelemetryの今後の展望 3 ⽬次
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. SRE におけるオブザーバビリティの重要性 4 『SREをはじめよう』 14章より
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Trademark. OpenTelemetry is a collection of APIs, SDKs, and tools. Use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) to help you analyze your software’s performance and behavior. OpenTelemetry official page https://opentelemetry.io/ 5
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Trademark. OpenTelemetry の 主要構成要素 6
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. テレメトリーパイプラインの構成要素 7 サービス SDK コレクター インフラ OTLP API コレクター バックエンド
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. OpenTelemetry API/SDK の役割 8 サービス API SDK ビジネスロジック ミドルウェア 各種クライアント API • 計装の本体は API のみを⽤いる • デフォルトでは no-op SDK • テレメトリー収集と送信の本体
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. レシーバー テレメトリーの受信と内部データへの変換 プロセッサー 内部データへの追加処理 エクスポーター 外部へのテレメトリーの送信(転送) コネクター ⾃分へデータをルーティング OpenTelemetry コレクターの役割 9 c.f. AWS Distro for CloudWatch コレクター
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. バックエンドシステムとの連携 10 • コレクター • SDK OTLP 独⾃プロトコル OTLP OpenTelemetry が策定したテレメトリー送受信の ための標準プロトコル(データ形式) 送信 • エクスポーターによって独⾃プロトコルに対応 • プル型も対応可能
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Trademark. テレメトリーパイプラインの パターン 11
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. テレメトリーパイプラインとは 後の保存と分析のためにテレメトリーの処理を⾏うパイプライン • メタデータの付与 • テレメトリーの集約 • テレメトリーのフィルター • ルーティング etc... 12 マクロパイプライン 内部パイプライン
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. 内部パイプラインの例 13 app: user otlp app: user k8s.node.name: worker-a2d4 k8s.pod.name: user-cf81 k8s.pod.uid: xxxxx k8s.pod.start_time: xxxxx k8s.deployment.name: xxxxx … otlp k8sattributes attributes app: user node: worker-a2d4 pod: user-cf81
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. マクロパイプラインのパターン テレメトリーパイプラインのパターンを分類する上での検討事項 • システムコンポーネント数 • インスタンス数 • スケーラビリティ • ランタイム • ネットワーク etc… 14
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. パターン1: 直結 15 利点 • コレクターがいないのでシンプル • 送信元とバックエンドの関係性が明らか ⽋点 • 各アプリにエクスポーター⽤の設定が必要 • エクスポーター⽤の設定が外部から変更不可 • 各アプリが個別にホストやクラスターに関する メタデータを付与 • 各アプリがテレメトリーの変換処理を実施 • バックエンドに向けて通信の設定 トレース メトリクス
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. パターン2: サイドカー 16 利点 • アプリ側の送信情報を変更しなくてよい • 内部パイプラインで共通のメタデータを ⾃動挿⼊できる • テレメトリーの変換処理をコレクターに オフロード可能 ⽋点 • バックエンドに向けて通信の設定 • サイドカーの設定が追加 トレース メトリクス
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. パターン3: プロキシ 17 利点 • 送信先はプロキシのコレクターのみでよい • 全アプリ共通の処理をまとめてプロキシに オフロードできる • プロキシとバックエンド間のみ通信できれ ばよい • バックエンド向けエクスポーターの設定が プロキシに集約できる • トレース全体の情報に基づいた集約が可能 ⽋点 • スケールするとプロキシに必要な計算資源 が⼤きくなる • プロキシがSPOFになる • トレースの集約をすると送信が遅れる トレース メトリクス OTLP
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. 補⾜: トレースの集約 18 250ms レイテンシーによるテイルサンプリングを したい場合は全スパンを待つ必要がある
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. パターン4: コレクタープール 19 利点 • プロキシパターンの利点全般 • マクロパイプラインのスケーラビリティ が上がる ⽋点 • 構成が複雑になる • トレースの集約ができなくなる トレース メトリクス OTLP
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. パターン4: コレクタープール 20 利点 • サーバレス構成の場合にも対応しやすい ⽋点 • サービスの起動が遅くなる
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Trademark. 検討事項 21
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. 検討事項 22 すべてのパターンに共通する主要な検討事項 • CPU/メモリの消費量 • バイナリサイズ • スケーラビリティ • 構成の複雑度 • フィルタリング/サンプリング • トランザクション全体を元にした集約の必要性
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. CPU/メモリの消費量 アプリケーションやコレクターのオブザーバビリティも必要 23 プロセッサーの調整 • Batch • Memory Limiter 内部テレメトリーの送信 service: telemetry: metrics: readers: - periodic: exporter: otlp: protocol: grpc/protobuf endpoint: http://localhost:14317 zPages や pprof の活⽤ extensions: health_check: pprof: zpages: service: extensions: [health_check, pprof, zpages]
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. バイナリサイズ 起動時間の短縮とリソース消費の抑制 24 otelcol-otlp otelcol otelcol-contrib ADOT 最新バージョン 0.118.0 0.118.0 0.118.0 0.42.0 バイナリサイズ※1 8.18MB 28.1MB 68.9 MB 34.3MB コンポーネント数 5 34 212 47 配布元 公式 公式 公式 AWS ※1 ARM64 の deb パッケージのサイズ ⽤途に合わせたディストリビューションを選択 必要ならば ocb を⽤いて⾃前ビルド
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. スケーラビリティと構成の複雑度 中規模以上のマイクロサービスには柔軟な構成が必要 25 スケーラビリティと構成の複雑度は⽐例 • デプロイメント • アクセス制御(IAMロール、KMS) • ネットワーク • 各コレクターの監視体制
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. フィルタリング/サンプリング 全量取得ができない場合もある 26 予算の都合、オーバーヘッド削減、法律・規制 • Filter • Reduction • Transform • Tail Sampling • Probabilistic Sampling
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. トランザクション全体を元にした集約の必要性 Tail Sampling が代表例 27 バッファリングが必要なケースがある • Tail Sampling • コネクター全般
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Trademark. OpenTelemetry の今後の展望 28
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. OpenTelemetry の今後の発展 29 テレメトリーパイプラインに関するアップデート • コレクタープール管理⽤のプロトコルとコントロールプレーン • テレメトリーデータ変換⽤の DSL • Apache Arrow への対応
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. OpAMP (Open Agent Management Protocol) コレクタープール管理⽤のプロトコルとコントロールプレーン 30 コレクター OpAMP Client OpAMP Supervisor OpAMP Client OpAMP Server 新しい設定 OpAMPプロトコル 既存の設定に新しい設定を マージした設定を作成 1 2 3 新しい設定を読み込ませて 再起動させる OpAMPの実装 ステータス AcceptsRemoteConfig ✅ ReportsEffectiveConfig ⚠ AcceptsPackages ⚠ ReportsPackageStatuses 📅 ReportsOwnMetrics 📅 ReportsOwnLogs ⚠ AcceptsOpAMPConnectionSettings 📅 AcceptsOtherConnectionSettings ⚠ AcceptsRestartCommand ⚠ ReportsHealth ⚠ ReoprtsRemoteConfig ⚠
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. OTTL (OpenTelemetry Transformation Language) テレメトリーデータ変換⽤の DSL 31 次のプロセッサーで共通で使⽤可能 (2025年1⽉現在はアルファ) • Transform プロセッサー • Filter プロセッサー • Tail Sampling プロセッサー • Routing コネクター transform: error_mode: ignore metric_statements: - context: metric conditions: - type == METRIC_DATA_TYPE_SUM and Len(data_points) > 0 statements: - set(description, "Sum")
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. OpenTelemetry Protocol with Apache Arrow (otel-arrow) ⾼圧縮⾼スループットのプロトコル 32 OTLP に Apache Arrow を載せる • データを Apache Arrow 形式にして転送 • Apache Arrow Flight をサポートするわけでは ない • ⼤量データが定常的に来るコレクターに向いて いる • ステートフルなためロードバランサーなどに配 置する場合は注意 OTEP-0156 より
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. まとめ • 代表的な OpenTelemetry のテレメトリーパイプラインの構成 • 各パターンに利点・⽋点がある • 検討事項に応じてパターンがある程度選択できる • OpenTelemetry ではテレメトリーパイプラインを便利にする機能拡張がされて いる 33
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. Do more with AWS Builder ID 34 AWS Builder IDで • AWS Skill Builder の600以上の無料コース • Amazon Q Developer などのツールの利⽤ • AWS builders コミュニティ への参加 が可能になります。
© 2025, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Trademark. Thank you! © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Trademark. Yoshi Yamaguchi @ymotongpoo