[Feature Request] Support / provide guidance on using OpenTelemetry logging + metrics SDKs with process-pool workers
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
- #1017 來自 @gregbrowndev —— 已關閉,未合併
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 20/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- python
研究方向
先查看連結的 OpenTelemetry fork 程序文件和 samples-python open_telemetry/worker.py 範例,接著檢查 TracingInterceptor 與 activity.metric_meter() 在 async 和 process-pool worker 中的行為。當專案為 async、thread-pool 和 process-pool worker 中的記錄日誌與自訂指標提供指南或原生支援時,此 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 小時
- 30 天內合併 PR
- 44
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 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 一週以上 新手友好度 25/100
temporalio/sdk-python#2115 ·
維護者通常 1 天內回覆
-
Support custom peer identity verification while retaining standard TLS authentication可能已有人在做 @dzsquared 於 23 天前認領。 未關閉
難度 5/5 一週以上 新手友好度 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 天內回覆