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.6k
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
AI時代に、プロダクトの数だけ積み上がる所有コストをどうエンジニアリングするか / Engineering the Cost of Ownership
kzkmaeda
0
970
「重なり」は迎える側がつくる ― 人もAIエージェントも歓迎するプロダクトエンジニアリング ―
go0517go
PRO
0
230
V8コントリビュート超入門
riyaamemiya
0
130
作り直せるコードは迅速に 作り直せないDBは慎重に - AI時代のプロダクトエンジニアが「判断の不可逆性」で開発速度を変える話
kinosuke01
0
220
Guerilla InnerSource in enterprises, during the AI hype
onenashev
PRO
0
150
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
0
360
Genie Code ワークショップ 応用編 / Genie-Code-Workshop-advanced
databricksjapan
PRO
0
310
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
3
790
Genie Code ワークショップ 基礎編 / Genie-Code-Workshop-fundamental
databricksjapan
PRO
0
340
設計の世代交代を乗り越える、14年続くAndroidアプリの開発戦略
sansantech
PRO
1
120
最新技術に積極チャレンジ!EKS共通基盤のこれまでとこれから
daitak
0
300
Bet AI Day 2026丨AIによって本質に戻るシステムリスク管理
layerx
PRO
0
820
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
360
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
220
Building a Scalable Design System with Sketch
lauravandoore
463
34k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
520
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
810
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
470
Odyssey Design
rkendrick25
PRO
2
800
Designing Experiences People Love
moore
143
24k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
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