[Feature Request] Support / provide guidance on using OpenTelemetry logging + metrics SDKs with process-pool workers
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
- #1017 von @gregbrowndev — ohne Merge geschlossen
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- observability
Rechercherichtung
Beginnen Sie mit der Durchsicht der verlinkten OpenTelemetry-Dokumentation zu Fork-Prozessen und des Beispiels samples-python open_telemetry/worker.py. Untersuchen Sie anschließend, wie sich TracingInterceptor und activity.metric_meter() in async- und process-pool-Workern verhalten. Die Aufgabe ist abgeschlossen, wenn das Projekt eine Anleitung oder native Unterstützung für Logging und benutzerdefinierte Metriken über async-, thread-pool- und process-pool-Worker hinweg bereitstellt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 1.3k
- Forks
- 305
- Ø Merge
- 3 T. 23 Std.
- Gemergte PRs (30 T.)
- 44
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus temporalio/sdk-python
-
[Bug] Catching the ValueError from upsert_search_attributes (naive datetime) still leaves a workflow stuck retrying its taskEvtl. vergeben @VegetarianOrc hat das heute übernommen. Offensdk-python
temporalio/sdk-python#2200 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] Python: replayed Local Activity timeout causes NDE (TimeoutError not wrapped in ActivityError)Evtl. vergeben @mjameswh hat das vor 1 Tag übernommen. Offenbug sdk-python
temporalio/sdk-python#2183 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] workflow_streams: subscribe() raises RPCError when a publish signal lands during the continue-as-new workflow taskEvtl. vergeben @feiiiiii5 hat das vor 5 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
temporalio/sdk-python#2170 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] Deadlock interruption can leak CPython's import lock and freeze the worker (still on Python 3.13/3.14)Evtl. vergeben @tconley1428 hat das vor 21 Tagen übernommen. Offensdk-python
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
temporalio/sdk-python#2115 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Support custom peer identity verification while retaining standard TLS authenticationEvtl. vergeben @dzsquared hat das vor 23 Tagen übernommen. Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
temporalio/sdk-python#2106 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in temporalio/sdk-python
Ähnliche Issues
-
area:print-dispatch
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 92/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Apich-Organization/rssn#295 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
chore claimed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
schuyler/corvidae#1424 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag