[Feature Request] Loss of stack trace information
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
Línea de trabajo
Comienza en temporalio/converter.py, alrededor de las líneas 826-829, donde se copia el fallo, y reproduce el problema con los puntos de entrada TestParentWorkflow, TestChildWorkflow y test_activity. Sigue cómo se mueve el stack_trace del Failure Protobuf a través de la cadena ActivityError y ChildWorkflowError. La tarea estará terminada cuando Sentry pueda acceder a la información del stack trace de cada error de la cadena sin perder el trace original de la actividad.
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.
- I would like to include full stack trace information in Sentry - see screenshot below where only
ChildWorkflowErrorhas a stack trace and bothActivityErrorandApplicationErrorare missing it. - I understand the exceptions are passed through the distributed system using the
FailureProtobuf message which has astack_tracefield which could be used to populate the Sentry stack trace. This works for getting the stack trace of theApplicationErrorin the activity. However, it's impossible to get the stack trace for theActivityErrorin theTestChildWorkflowbecause the failure is just copied from the original failure here: https://github.com/temporalio/sdk-python/blob/bf747f1170e603b1e1adbd77c673fa83f0c99e7d/temporalio/converter.py#L826-L829
This is the workflow and activity code I'm using to test this:
@activity.defn(...)
async def test_activity() -> None:
raise TestException("Test error")
@workflow.defn
class TestChildWorkflow:
@workflow.run
async def run(self) -> None:
# execute_default_activity is our wrapper around workflow.execute_activity
await execute_default_activity(
test_activity,
retry_policy=RetryPolicy(maximum_attempts=1),
),
@workflow.defn
class TestParentWorkflow:
@workflow.run
async def run(self) -> None:
# child workflow fails parent workflow
await workflow.execute_child_workflow(
TestChildWorkflow.run,
id=f"test-child-workflow-{int(workflow.time())}",
task_queue=get_temporal_tasks_queue_name(),
)
Describe the solution you'd like
- Ability to get the stack trace for every error in the chain. I am happy to contribute this code but I am not sure if there is a strong reason for why it is done this way and whether it can be changed.
- Lenguaje dominante
- Python
- Estrellas
- 1.2k
- Forks
- 241
- Merge medio
- 3 d 2 h
- PR fusionados (30 d)
- 49
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
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
temporalio/sdk-python#1517 · 10 comentarios ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
temporalio/sdk-python#496 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
temporalio/sdk-python#1890 ·
-
[Bug] Local activity resolutions regrouped on replay since 1.32.0, delivering the wrong payload Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
temporalio/sdk-python#1881 · 1 comentario ·
-
bug
temporalio/sdk-python#1817 · 1 comentario · 1 asignado ·
Todos los issues de temporalio/sdk-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100