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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
280
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
810
1,000 にも届く AWS Organizations 組織のポリシー運用をちゃんとしたい、という話
kazzpapa3
1
250
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
3
1.4k
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
230
Generative UI を試そう!A2-UIでAIエージェントにダッシュボードを作らせてみた
kamoshika
0
190
Greatest Disaster Hits in Web Performance
guaca
0
340
LLMOpsのこれまでとこれからを学ぶ
nsakki55
2
570
登壇駆動学習のすすめ — CfPのネタの見つけ方と書くときに意識していること
bicstone
3
200
pool.ntp.orgに ⾃宅サーバーで 参加してみたら...
tanyorg
1
2.9k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
94k
生成AIと余白 〜開発スピードが向上した今、何に向き合う?〜
kakehashi
PRO
1
250
Featured
See All Featured
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
140
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
93
Build your cross-platform service in a week with App Engine
jlugia
234
18k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
280
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.7k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
How to Ace a Technical Interview
jacobian
281
24k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
A designer walks into a library…
pauljervisheath
210
24k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
950
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