[Feature Request] Support / provide guidance on using OpenTelemetry logging + metrics SDKs with process-pool workers
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #1017 của @gregbrowndev — đã đóng, không merge
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- observability
Hướng nghiên cứu
Bắt đầu bằng cách xem lại tài liệu OpenTelemetry được liên kết về tiến trình fork và ví dụ samples-python open_telemetry/worker.py, sau đó kiểm tra cách TracingInterceptor và activity.metric_meter() hoạt động trong các worker async và process-pool. Issue được hoàn tất khi dự án cung cấp hướng dẫn hoặc hỗ trợ native cho việc logging và các metric tùy chỉnh trên các worker async, thread-pool và process-pool.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 1.3k
- Fork
- 305
- Merge trung bình
- 3 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 44
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của temporalio/sdk-python
-
[Bug] Catching the ValueError from upsert_search_attributes (naive datetime) still leaves a workflow stuck retrying its taskCó thể đã có người làm @VegetarianOrc đã nhận hôm nay. Đang mởsdk-python
temporalio/sdk-python#2200 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Python: replayed Local Activity timeout causes NDE (TimeoutError not wrapped in ActivityError)Có thể đã có người làm @mjameswh đã nhận 1 ngày trước. Đang mởbug sdk-python
temporalio/sdk-python#2183 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] workflow_streams: subscribe() raises RPCError when a publish signal lands during the continue-as-new workflow taskCó thể đã có người làm @feiiiiii5 đã nhận 5 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
temporalio/sdk-python#2170 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Deadlock interruption can leak CPython's import lock and freeze the worker (still on Python 3.13/3.14)Có thể đã có người làm @tconley1428 đã nhận 21 ngày trước. Đang mởsdk-python
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
temporalio/sdk-python#2115 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support custom peer identity verification while retaining standard TLS authenticationCó thể đã có người làm @dzsquared đã nhận 23 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
temporalio/sdk-python#2106 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của temporalio/sdk-python
Issue tương tự
-
area:print-dispatch
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Apich-Organization/rssn#295 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
chore claimed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
schuyler/corvidae#1424 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày