[Feature Request] Support / provide guidance on using OpenTelemetry logging + metrics SDKs with process-pool workers
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
- #1017 de @gregbrowndev — cerrado sin fusionar
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- observability
Línea de trabajo
Comienza revisando la documentación enlazada de OpenTelemetry sobre procesos fork y el ejemplo samples-python open_telemetry/worker.py; después, inspecciona cómo se comportan TracingInterceptor y activity.metric_meter() en workers async y de process-pool. El issue estará terminado cuando el proyecto proporcione orientación o soporte nativo para el logging y las métricas personalizadas en workers async, de thread-pool y de process-pool.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 1.3k
- Forks
- 305
- Merge medio
- 3 d 23 h
- PR fusionados (30 d)
- 44
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de temporalio/sdk-python
-
[Bug] Catching the ValueError from upsert_search_attributes (naive datetime) still leaves a workflow stuck retrying its taskPosiblemente ocupada @VegetarianOrc la tomó hoy. Abiertosdk-python
temporalio/sdk-python#2200 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Bug] Python: replayed Local Activity timeout causes NDE (TimeoutError not wrapped in ActivityError)Posiblemente ocupada @mjameswh la tomó hace 1 día. Abiertobug sdk-python
temporalio/sdk-python#2183 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Bug] workflow_streams: subscribe() raises RPCError when a publish signal lands during the continue-as-new workflow taskPosiblemente ocupada @feiiiiii5 la tomó hace 5 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
temporalio/sdk-python#2170 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Deadlock interruption can leak CPython's import lock and freeze the worker (still on Python 3.13/3.14)Posiblemente ocupada @tconley1428 la tomó hace 21 días. Abiertosdk-python
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
temporalio/sdk-python#2115 ·
Los mantenedores suelen responder en 1 día
-
Support custom peer identity verification while retaining standard TLS authenticationPosiblemente ocupada @dzsquared la tomó hace 23 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
temporalio/sdk-python#2106 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de temporalio/sdk-python
Issues similares
-
area:print-dispatch
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Apich-Organization/rssn#295 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
chore claimed
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
schuyler/corvidae#1424 · 2 comentarios ·
Los mantenedores suelen responder en 1 día