Add optional OpenTelemetry tracing for subscription hydration
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- postgresql, rust
- 領域
- backend, observability
調査の方向性
Start by reading the observability documentation and the existing OTEL_* configuration and metrics/log export code; the issue does not name specific files. Map the subscription registration and initial hydration stages, including their asynchronous boundaries, before proposing a design. Done means opt-in traces cover hydration with context propagation, configurable sampling and nonblocking export, with tests and updated documentation and example configuration.
索引モデルが issue の本文から書いたものです。
説明
Context
Streamgres already provides detailed Prometheus metrics and optional
OpenTelemetry export for metrics and logs. The observability documentation
also explicitly mentions that traces are not currently produced and that
OTEL_TRACES_EXPORTER is accepted but ignored.
The existing stage-level histograms are useful for identifying aggregate
latency, but it would also be useful to correlate the individual stages of
a subscription's initial hydration as one operation.
For example, when a subscription takes longer than expected to become
available, an individual trace could make it easier to distinguish time
spent in query transformation, planning, storage reads and hydration.
Proposed enhancement
It would be useful to explore adding opt-in OpenTelemetry trace export,
starting with the subscription registration and initial hydration lifecycle.
A trace could connect the relevant stages:
- Receiving the subscription request.
- Transforming and planning the query.
- Issuing the required storage reads.
- Landing the reads in the engine.
- Completing subscription hydration.
- Delivering the initial result to the client group.
The first iteration does not necessarily need to trace every transaction,
row update or feed operation. A focused subscription-hydration path would
already provide a useful starting point.
Design considerations
A few constraints seem particularly important for this project:
- Tracing should remain disabled by default and should be explicitly
configurable through the existingOTEL_*configuration approach. - Trace context should be preserved across the asynchronous and
thread/channel boundaries involved in the subscription lifecycle. - Sampling should be configurable so high-volume workloads do not produce
an unnecessarily large number of spans. - Span export should happen outside the engine and client-serving hot paths.
A bounded queue and dedicated export worker would be worth considering. - A slow or unavailable collector must not block payment-independent
synchronization work or the threads serving clients. - Dropped spans and export failures should be observable.
- Span attributes should avoid SQL literals, row contents, user data,
credentials and other sensitive information.
Acceptance criteria
-
OTEL_TRACES_EXPORTERcan explicitly enable or disable trace export. - Trace endpoint configuration follows the existing OTLP configuration
approach, including support for a dedicated traces endpoint. - A subscription's initial hydration can be represented by a trace
spanning the relevant processing stages. - Trace context is preserved where the lifecycle crosses asynchronous
tasks or thread/channel boundaries. - Sampling and bounded buffering prevent tracing from introducing
blocking work into the engine or client-serving paths. - Collector failures and dropped spans are handled without affecting
synchronization behaviour. - Tests cover configuration, trace encoding, context propagation and
export failure or queue saturation. - Existing metrics and log export behaviour remains unchanged.
- The observability documentation and example configuration are updated.
Discussion
I would be interested in contributing an initial implementation of this
capability. Before starting, it would be useful to understand whether
maintainers would prefer a focused hydration trace first or a broader
subscription-lifecycle tracing design.
- 主要言語
- Rust
- スター
- 129
- フォーク
- 7
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
juspay/streamgres のほかの issue
-
Make the top-L client diff cost depend on what changed, not on the limit対応中かも @SahilKhan101 が 4 日前に担当しました。 オープンenhancement
juspay/streamgres#64 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Query optimisation: share initial snapshots across LIMIT variants of the same query (donor windows)対応中かも @sprihaanand-juspay が 5 日前に担当しました。 オープン
juspay/streamgres#58 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1週間以上 初心者へのやさしさ 38/100
juspay/streamgres#56 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
juspay/streamgres#55 ·
メンテナーはふだん 1 日以内に返信
-
PgBouncer transaction pooling: `prepare` runs outside the read transaction and can land on another backend対応中かも @sprihaanand-juspay が 8 日前に担当しました。 オープン
juspay/streamgres#53 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
juspay/streamgres の issue をすべて見る
似ている issue
-
claim
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Nixitov/Riptide-Native#946 ·
メンテナーはふだん 1 日以内に返信
-
area: ai-assistants documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BetaBots-LLC/latticegate#17 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
storytold/craft-libs#5594 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
听歌识曲历史跳转后对应音源界面无法返回オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
LingyunStudio/RustMusic#16 ·