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
11
5k
Loadbalancing exporter internals
ymotongpoo
2
180
サンプリングは「作る」のか「使う」のか? 分散トレースのコストと運用を両立する実践的戦略 / Why you need the tail sampling and why you don't want it
ymotongpoo
4
310
生成AI時代の開発と運用 / Dev and Ops in Gen AI era
ymotongpoo
9
4.8k
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
12
11k
プロファイルとAIエージェントによる効率的なデバッグ / Effective debugging with profiler and AI assistant
ymotongpoo
1
1.9k
Goのビルドシステムの変遷 / The history of Go's build system
ymotongpoo
15
13k
今日から始めるpprof / Pprof workshop for beginners
ymotongpoo
8
10k
Amazon CloudWatchのメトリクスインターバルについて / Metrics interval matters
ymotongpoo
6
570
Other Decks in Technology
See All in Technology
アップデートで何が変わった?デモで学んで使いこなすIBM Bob2.0
muehara
0
110
発表と総括 / Presentations and Summary
ks91
PRO
0
140
なぜ私たちのSREプラクティスはなかなか機能しないのか 〜システムより先に組織を見る〜 / Why our SRE practices aren't really working
vtryo
4
4k
Terraform共通モジュールをチーム横断で“変えられる”運用へ ― リリースと適用の分離
kekke_n
1
3.3k
企業でAWS Organizationsを動かすための組織設計の考え方
nrinetcom
PRO
1
110
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
110k
穢れた技術選定について
watany
17
5.4k
はじめてのWDM
miyukichi_ospf
1
150
ガバナンスの「ちょうどいい落とし所」を探れ!開発スピードを妨げない運用判断の勘所 / SRE NEXT 2026
genda
1
240
第67回コンピュータビジョン勉強会CVPR2026読会前編
tsukamotokenji
0
140
インフラと開発の垣根を超えていき!〜元AWSインフラエンジニアがAWS開発で奮闘している話〜
hatahata021
3
300
Data + AI Summit 2026 イベントレポート: 「AIがビジネスで意思決定するデータ基盤」へ
nek0128
0
260
Featured
See All Featured
The Curse of the Amulet
leimatthew05
2
13k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
460
Docker and Python
trallard
47
4k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.6k
Practical Orchestrator
shlominoach
191
11k
How GitHub (no longer) Works
holman
316
150k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
190
Building an army of robots
kneath
306
46k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
370
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
750
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
190
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