[Feature Request] Support / provide guidance on using OpenTelemetry logging + metrics SDKs with process-pool workers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #1017 di @gregbrowndev — chiusa senza merge
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- observability
Direzione di ricerca
Inizia esaminando la documentazione collegata di OpenTelemetry sui processi fork e l’esempio samples-python open_telemetry/worker.py, quindi analizza il comportamento di TracingInterceptor e activity.metric_meter() nei worker async e nei worker di process-pool. L’issue è completata quando il progetto fornisce indicazioni o supporto nativo per il logging e le metriche personalizzate nei worker async, thread-pool e process-pool.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 1.3k
- Fork
- 305
- Merge medio
- 3g 23h
- PR unite (30g)
- 44
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di temporalio/sdk-python
-
[Bug] Catching the ValueError from upsert_search_attributes (naive datetime) still leaves a workflow stuck retrying its taskForse già presa @VegetarianOrc l’ha presa oggi. Apertasdk-python
temporalio/sdk-python#2200 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Python: replayed Local Activity timeout causes NDE (TimeoutError not wrapped in ActivityError)Forse già presa @mjameswh l’ha presa 1 giorno fa. Apertabug sdk-python
temporalio/sdk-python#2183 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] workflow_streams: subscribe() raises RPCError when a publish signal lands during the continue-as-new workflow taskForse già presa @feiiiiii5 l’ha presa 5 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
temporalio/sdk-python#2170 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Deadlock interruption can leak CPython's import lock and freeze the worker (still on Python 3.13/3.14)Forse già presa @tconley1428 l’ha presa 21 giorni fa. Apertasdk-python
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
temporalio/sdk-python#2115 ·
I maintainer di solito rispondono entro 1 giorno
-
Support custom peer identity verification while retaining standard TLS authenticationForse già presa @dzsquared l’ha presa 23 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
temporalio/sdk-python#2106 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di temporalio/sdk-python
Issue simili
-
area:print-dispatch
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Apich-Organization/rssn#295 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
chore claimed
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
schuyler/corvidae#1424 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno