feat(observability): exemplars for supervisor latency metrics

オープン
#5,890 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
18/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
observability

調査の方向性

This is a design proposal gated on upstream work: the pinned opentelemetry_sdk 0.33.1 exports empty exemplar lists for explicit-bucket histograms, tracked in OpenTelemetry Rust #3369. Start by reading #5364 and the supervisor metrics branch that already exports the policy-evaluation, request-inspection and upstream-connect histograms over OTLP, then watch the upstream PR that adds exemplar collection. Done means OTLP exemplars whose value matches the recorded duration and whose trace ID matches the sampled supervisor span, plus the metrics docs showing how to follow an exemplar to its trace. Because the dependency is unreleased, a newcomer cannot complete it today.

索引モデルが issue の本文から書いたものです。

説明

state:triage-needed
User Story

I operate OpenShell gateways and sandboxes. When a supervisor latency alert fires, I want to open a trace for an operation in the affected histogram bucket so I can see where it spent time.

Problem Statement

The supervisor latency histograms show how long policy evaluation, request inspection, and upstream connections take. Operators need a way to get from a histogram observation to the supervisor trace for that operation. This feature is a follow-up to #5364, due to upstream lack-of-support for exemplars at the time.

Impact / Why This Matters

Today, operators investigating slow sandbox egress must open their trace backend, filter supervisor traces by the affected supervisor and time window, and inspect individual spans to find a span with the duration they're looking for. That search delays incident triage and can turn up no matching trace when only a subset of requests is sampled.

Proposed Design

Export exemplars for the policy evaluation, request inspection, and upstream connect histograms, using the upstream feature in opentelemetry_sdk once it's released. A latency observation recorded while a sampled supervisor span is active is eligible to become an exemplar carrying that trace ID.

Acceptance Criteria
  • Each of the three supervisor latency histograms can export an OTLP exemplar whose value matches the recorded duration and whose trace ID matches the sampled supervisor span.
  • Observations without an active sampled supervisor span still contribute to histogram counts and sums and produce no exemplar.
  • Trace IDs are carried only in exemplars, keeping metric series cardinality independent of trace volume.
  • The supervisor metrics docs show how to configure metrics and traces and follow an exemplar to its trace in a compatible backend.
Alternatives Considered
  • Generate histograms and exemplars from spans in the collector. This can link a histogram to a trace, but it moves the burden to the collector and a user must set this up by themselves.
  • Collect exemplars in OpenShell. OpenShell could retain a bounded set of latency observations with sampled supervisor trace IDs and attach them to the matching histogram points during OTLP export. This could ship before opentelemetry_sdk adds support. OpenShell would own sample selection, bucket matching, and keeping exemplars aligned with each export interval. It's a logic that's not coherent to OpenShell and might create a drift from upstream that would require future undoing.
Agent Investigation

The supervisor metrics branch exports all three latency histograms over OTLP. The pinned OpenTelemetry Rust SDK (0.33.1) exports empty exemplar lists for explicit-bucket histograms. Upstream is tracking exemplar collection. OpenTelemetry Rust #3369

Checklist
  • I've reviewed existing issues and the published docs
  • This is a design proposal, not a "please build this" request
主要言語
Rust
スター
21.5k
フォーク
2.1k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/OpenShell のほかの issue

NVIDIA/OpenShell の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。