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
テイルサンプリングで注意すること / Tail sampling and challenges...
Search
ymotongpoo
February 19, 2026
Technology
1
10
テイルサンプリングで注意すること / Tail sampling and challenges with OpenTelemetry
OpenTelemetry Meetup in Sapporo での発表資料です
https://opentelemetry.connpass.com/event/376362/
ymotongpoo
February 19, 2026
Tweet
Share
More Decks by ymotongpoo
See All by ymotongpoo
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
4.2k
プロファイルとAIエージェントによる効率的なデバッグ / Effective debugging with profiler and AI assistant
ymotongpoo
1
1.5k
Goのビルドシステムの変遷 / The history of Go's build system
ymotongpoo
14
8.3k
今日から始めるpprof / Pprof workshop for beginners
ymotongpoo
8
5.6k
Amazon CloudWatchのメトリクスインターバルについて / Metrics interval matters
ymotongpoo
5
510
生成AI時代のSRE / SRE in Gen AI era
ymotongpoo
1
210
OpenTelemetry Collector internals
ymotongpoo
6
940
AIとSREの未来 / AI and SRE
ymotongpoo
2
2.9k
Amazon CloudWatch Application Signals ではじめるバーンレートアラーム / Burn rate alarm with Amazon CloudWatch Application Signals
ymotongpoo
8
1.5k
Other Decks in Technology
See All in Technology
プレビュー版のDevOpsエージェントを現段階で触ってみた
ad_motsu
1
160
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
280
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
1k
LiDARが変えたARの"距離感"
zozotech
PRO
0
230
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
56
47k
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
1
1k
React 19時代のコンポーネント設計ベストプラクティス
uhyo
9
3.3k
量子クラウドサービスの裏側 〜Deep Dive into OQTOPUS〜
oqtopus
0
330
マネージャー視点で考えるプロダクトエンジニアの評価 / Evaluating Product Engineers from a Manager's Perspective
hiro_torii
0
290
コンテナセキュリティの最新事情 ~ 2026年版 ~
kyohmizu
8
2.9k
AIが実装する時代、人間は仕様と検証を設計する
gotalab555
5
930
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
230
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
2
270
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Everyday Curiosity
cassininazir
0
140
The untapped power of vector embeddings
frankvandijk
1
1.6k
Into the Great Unknown - MozCon
thekraken
40
2.3k
Prompt Engineering for Job Search
mfonobong
0
170
Raft: Consensus for Rubyists
vanstee
141
7.3k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
140
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
180
A Soul's Torment
seathinner
5
2.3k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Transcript
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 1 © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. テイルサンプリングで注意すること ⼭⼝能迪 (@ymotongpoo) O P E N T E L E M E T R Y M E E T U P I N S A P P O R O アマゾンウェブサービスジャパン合同会社 シニアデベロッパーアドボケイト
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 2 © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. ⾃⼰紹介 ⼭⼝ 能迪(やまぐち よしふみ) アマゾンウェブサービスジャパン合同会社 シニアデベロッパーアドボケイト 専⾨領域 • オブザーバビリティ • SRE全般 @ymotongpoo
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 3 ⼊⾨ OpenTelemetry 3章 OpenTelemetry概要 トレースはトランザクションのオブザーバビリティの 中核です。分散システムのパフォーマンス、健全性、 そして本番環境での挙動を理解するための最良の⽅法 です。
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 4 シナリオ: 分散トレースを取得したい 分散トレースを取得する計装をした
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 5 最初期: ボトルネックが⾒つかって嬉しい • スロークエリが⾒つかった • 不必要な直列処理を発⾒した • 予期しない依存関係を発⾒した
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 6 中期: トレースが多すぎる • ストレージコストが⾼い • 分析ツールが重い(⾃前運⽤) • 計測時のオーバーヘッド • コレクターがSPOF
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 7 解決策1: コレクタープール コレクターを複数⽴てて負荷分散
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 8 解決策2: サンプリング ヘッドベースサンプリング 最初のスパンを受け取った瞬間に記録するかを決定 有⼒な⼿法 • 確率的サンプリング • eg. 100回に1回(1%) • ルールベースサンプリング • eg. ヘルスチェックの除外 テイルベースサンプリング 特定のトレースのすべてのスパンを受け取ったあとに 記録するかを決定 有⼒な⼿法 • ルールベースサンプリング • eg. トレース全体のレイテンシー • eg. スパン数の合計 • eg. 特定のスパンが含まれるか
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 9 コレクタープール × テイルベースサンプリングの罠 テイルを知る術がない
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 10 コレクタープール x テイルベースサンプリングの罠 ロードバランサーがトレースIDを ⾒て振り分けないとだめ
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 11 © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. デモ
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 12 loadbalancing エクスポーター & tail_sampling プロセッサー https://github.com/ymotongpoo/otel-lb-tailsampling-demo
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 13 loadbalancing エクスポーターの設定 exporters: loadbalancing: routing_key: "traceID" protocol: otlp: resolver: dns: hostname: otel-tier2-internal port: "4317" トレースなら "service", "traceID", "attribute" が有効
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 14 コレクタープール側の設定 kind: Service metadata: name: otel-tier2-internal spec: clusterIP: None # Headlessにする selector: app: otel-tier2 ports: - port: 4317 targetPort: 4317 kind: StatefulSet metadata: name: otel-tier2 spec: serviceName: otel-tier2-internal replicas: 4 selector: matchLabels: app: otel-tier2 template: metadata: labels: app: otel-tier2 Pod名を {StatefulSet名}-{通し番号} で固定
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 15 tail_sampling プロセッサーの設定 processors: batch: tail_sampling: decision_wait: 5s num_traces: 10000 expected_new_traces_per_sec: 100 policies: - name: latency-policy type: latency latency: {threshold_ms: 100}
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 17 チャレンジ OTLP でロードバランサーに送信しているときに起きていること • エクスポーターからロードバランサーへの送信も1つのトレース • ロードバランサーは送信トレースのヘッダー (traceparent) は⾒れる • OTLP over gRPC は内部に複数のトレースデータ (protobuf) を持つ loadbalancing エクスポーター SpanレベルまでProtobufの中⾝を⾒て ルーティングできる。最強。 汎⽤ L4/L7 LB • 送信のトレースのHTTPヘッダしか⾒れない。 • 期待した動作を実現するためにはProtobufの中⾝ を⾒れるような拡張を作る必要がある。 • さらに動的にDNSでコレクターの名前を解決しな いといけない。
© 2026, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 18 AWS Builder Center で知⾒を共有してください builders.aws.com