Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Feature Request] Loss of stack trace information

未关闭
#807 3 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python

调研方向

从 temporalio/converter.py 第 826-829 行附近开始,这里会复制 failure,并使用 TestParentWorkflow、TestChildWorkflow 和 test_activity 入口复现问题。跟踪 Failure Protobuf 的 stack_trace 如何经过 ActivityError 和 ChildWorkflowError 链。完成标准是:Sentry 能够访问链中每个 error 的 stack trace 信息,同时不会丢失原始 activity trace。

由索引模型根据 Issue 内容生成。

描述

enhancement
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 ChildWorkflowError has a stack trace and both ActivityError and ApplicationError are missing it.
  • I understand the exceptions are passed through the distributed system using the Failure Protobuf message which has a stack_trace field which could be used to populate the Sentry stack trace. This works for getting the stack trace of the ApplicationError in the activity. However, it's impossible to get the stack trace for the ActivityError in the TestChildWorkflow because the failure is just copied from the original failure here: https://github.com/temporalio/sdk-python/blob/bf747f1170e603b1e1adbd77c673fa83f0c99e7d/temporalio/converter.py#L826-L829
Image

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.
主要语言
Python
星标
1.2k
派生
252
平均合并
4 天 13 小时
30 天内合并 PR
50

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

temporalio/sdk-python 的其他 Issue

查看 temporalio/sdk-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。