[Feature Request] Support / provide guidance on using OpenTelemetry logging + metrics SDKs with process-pool workers
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #1017 @gregbrowndev による — マージされずにクローズ
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
まず、リンクされている OpenTelemetry の fork プロセスに関するドキュメントと samples-python の open_telemetry/worker.py の例を確認し、次に async および process-pool ワーカーで TracingInterceptor と activity.metric_meter() がどのように動作するかを調査します。プロジェクトが async、thread-pool、process-pool ワーカー全体でのロギングとカスタムメトリクスについて、ガイダンスまたはネイティブサポートを提供した時点で、この issue は完了です。
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
Hi,
I've been rolling out an OpenTelemetry-based observability solution for my Temporal app. The reason for using OTel is partly due to the Temporal Python SDK already using OTel for traces and metrics (in the SDK), so I want to adopt those SDKs for custom metrics and logging.
Everything works great in async activities. I've been able to use OTel tooling for logging and tracing (using the TracingInterceptor as seen in this example), I can see traces with their correlated logs for each activity in my backend (Grafana, Loki, Tempo). The Temporal SDK provides activity.metric_meter(), which I've used to add custom metrics to async activities.
However, I'm having several issues with sync activities running on process-pool-based workers (I'm happy to split them into separate issues):
The trace_id and span_id injected into the logs are incorrect for all except the first activity that runs on that worker. It seems that the first activity's IDs are injected into all activities that follow it.
- Temporal SDK's
activity.metric_meter()doesn't work in process-pools, which is clearly a known but probably related issue. I planned to set up a separate OTelMetricProviderto support custom metrics in my sync activities. However, this looks to have the same limitations (I haven't tried everything exhaustively yet).
Note: I suspect initialising the MeterProvider for each process/activity will be a lot more simple because it isn't attached to a global root logger.
While these issues are likely inherently within the OTel SDKs, the same issues are also known to be true for the TracingProvider (ref), yet Temporal managed to get that to work.
Please provide guidance on setting up OTel logging and custom metrics in process-pool-based workers or support them natively like you do OTel tracing.
Describe the solution you'd like
Support for the remaining OpenTelemetry SDKs (metric and logging) natively in both async, thread-pool, and process-pool workers.
- 主要言語
- Python
- スター
- 1.3k
- フォーク
- 305
- 平均マージ
- 3日 23時間
- マージ済み PR(30日)
- 44
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
temporalio/sdk-python のほかの issue
-
[Bug] Catching the ValueError from upsert_search_attributes (naive datetime) still leaves a workflow stuck retrying its task対応中かも @VegetarianOrc が今日担当しました。 オープンsdk-python
temporalio/sdk-python#2200 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Python: replayed Local Activity timeout causes NDE (TimeoutError not wrapped in ActivityError)対応中かも @mjameswh が 1 日前に担当しました。 オープンbug sdk-python
temporalio/sdk-python#2183 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] workflow_streams: subscribe() raises RPCError when a publish signal lands during the continue-as-new workflow task対応中かも @feiiiiii5 が 5 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
temporalio/sdk-python#2170 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Deadlock interruption can leak CPython's import lock and freeze the worker (still on Python 3.13/3.14)対応中かも @tconley1428 が 21 日前に担当しました。 オープンsdk-python
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
temporalio/sdk-python#2115 ·
メンテナーはふだん 1 日以内に返信
-
Support custom peer identity verification while retaining standard TLS authentication対応中かも @dzsquared が 23 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
temporalio/sdk-python#2106 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
temporalio/sdk-python の issue をすべて見る
似ている issue
-
area:print-dispatch
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Apich-Organization/rssn#295 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
chore claimed
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
schuyler/corvidae#1424 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信