Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Loadbalancing exporter internals

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Loadbalancing exporter internals

OpenTelemetry meetup 2026-05 の発表資料です
https://opentelemetry.connpass.com/event/390564/

これの前提となっているセッションはこちらに録画があるので、そちらも確認してください。
https://event.cloudnativedays.jp/cnk/talks/3062
https://speakerdeck.com/ymotongpoo/why-you-need-the-tail-sampling-and-why-you-dont-want-it

Avatar for ymotongpoo

ymotongpoo

May 21, 2026

More Decks by ymotongpoo

Other Decks in Technology

Transcript

  1. OpenTelemetry meetup 2026-05 – May 21st, 2026 Loadbalancing エクスポーター について

    山口 能迪 (@ymotongpoo) Staff Developer Advocate, Grafana Labs
  2. 解決策 2: サンプリング トレースのサンプリングの大きな分岐点 最初のスパンを受け取った瞬間に記 録有無を決定 特定のトレースのすべてのスパンを受 け取った後に記録するかを決定 ヘッドベースサンプリング テイルベースサンプリング

    確率的サンプリング • eg) 100回に1回記録 (1%) ルールベースサンプリング • eg) ヘルスチェックの除外 ルールベースサンプリング • eg) トレース全体のレイテンシー • eg) スパン数の合計 • eg) 特定のスパンの有無
  3. 解決策 2: サンプリング トレースのサンプリングの大きな分岐点 最初のスパンを受け取った瞬間に記 録有無を決定 特定のトレースのすべてのスパンを受 け取った後に記録するかを決定 ヘッドベースサンプリング テイルベースサンプリング

    確率的サンプリング • eg) 100回に1回記録 (1%) ルールベースサンプリング • eg) ヘルスチェックの除外 ルールベースサンプリング • eg) トレース全体のレイテンシー • eg) スパン数の合計 • eg) 特定のスパンの有無 みんなこれをやりたがる
  4. しかもバッチで来る A A A B1 B1 B1 A A A

    B1 B1 B1 ロードバランサーが見える ヘッダーはパケットの外
  5. Tier 1: Gateway loadbalancing エクスポーターの設定 exporters: loadbalancing: routing_key: "traceID" protocol:

    otlp: resolver: dns: hostname: otel-tier2-internal port: "4317" トレースなら "service", "traceID", "attribute" が有効
  6. loadbalancingエクスポーター動作原理 1. デコード A A A B1 B1 B1 A

    A A B1 B1 B1 まずptrace形式でスパンを全部バラす
  7. loadbalancingエクスポーター動作原理 3. ハッシュ A A A B1 B1 B1 hash:

    374044869 hex: 0x164b78c5 position: 4869 traceID: 4bf92f…4736 traceID: 0af765…319c hash: 223009813 hex: 0x0d4adc15 position: 25813 traceID: 70bc2f…ce51 hash: 3272612155 hex: 0xc310193b position: 32155 この番地に応じて宛先ノードを決定する CRC32でハッシュ化して36000でmod
  8. コレクタープール側の設定 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名}-{通し番号} で固定 Tier 2: Sampling