[Feature Request] Support / provide guidance on using OpenTelemetry logging + metrics SDKs with process-pool workers
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
- #1017 de @gregbrowndev — fechado sem integrar
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 20/100
- Tipo de issue
- Funcionalidade
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Estagnada
- Stack de tecnologia
- python
- Domínio
- observability
Direção de pesquisa
Comece revisando a documentação vinculada do OpenTelemetry sobre processos fork e o exemplo samples-python open_telemetry/worker.py; em seguida, inspecione como TracingInterceptor e activity.metric_meter() se comportam em workers async e de process-pool. A issue estará concluída quando o projeto fornecer orientação ou suporte nativo para logging e métricas personalizadas em workers async, de thread-pool e de process-pool.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 1.3k
- Forks
- 305
- Merge médio
- 3d 23h
- PRs com merge (30d)
- 44
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de temporalio/sdk-python
-
[Bug] Catching the ValueError from upsert_search_attributes (naive datetime) still leaves a workflow stuck retrying its taskTalvez já em andamento @VegetarianOrc assumiu hoje. Abertasdk-python
temporalio/sdk-python#2200 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
[Bug] Python: replayed Local Activity timeout causes NDE (TimeoutError not wrapped in ActivityError)Talvez já em andamento @mjameswh assumiu há 1 dia. Abertabug sdk-python
temporalio/sdk-python#2183 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
[Bug] workflow_streams: subscribe() raises RPCError when a publish signal lands during the continue-as-new workflow taskTalvez já em andamento @feiiiiii5 assumiu há 5 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
temporalio/sdk-python#2170 ·
Mantenedores costumam responder em até 1 dia
-
[Bug] Deadlock interruption can leak CPython's import lock and freeze the worker (still on Python 3.13/3.14)Talvez já em andamento @tconley1428 assumiu há 21 dias. Abertasdk-python
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
temporalio/sdk-python#2115 ·
Mantenedores costumam responder em até 1 dia
-
Support custom peer identity verification while retaining standard TLS authenticationTalvez já em andamento @dzsquared assumiu há 23 dias. Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
temporalio/sdk-python#2106 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de temporalio/sdk-python
Issues semelhantes
-
area:print-dispatch
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 92/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Apich-Organization/rssn#295 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
-
chore claimed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
schuyler/corvidae#1424 · 2 comentários ·
Mantenedores costumam responder em até 1 dia