feat(observability): exemplars for supervisor latency metrics
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 18/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
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 の本文から書いたものです。
説明
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 はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/OpenShell のほかの issue
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failure対応中かも @TaylorMutch が 9 日前に担当しました。 オープンstate:accepted state:pr-opened
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
state:triage-needed
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
NVIDIA/OpenShell の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
autofixer: follow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tursodatabase/turso#12531 ·
メンテナーはふだん 1 日以内に返信
-
bug help wanted ui
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
userFRM/egui-charts#4292 ·
メンテナーはふだん 1 日以内に返信
-
Issue-Bug Need-Review
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
PowerShell/DSC#1832 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
Tripstack-Corp/spyc#1352 ·
メンテナーはふだん 1 日以内に返信