[Feature Request] Loss of stack trace information
维护者通常 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 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 1.2k
- 派生
- 252
- 平均合并
- 4 天 13 小时
- 30 天内合并 PR
- 50
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
temporalio/sdk-python 的其他 Issue
-
Workflow sandbox re-imports annotated_types, so pydantic silently drops constraints可能已有人在做 @tconley1428 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
temporalio/sdk-python#1897 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
temporalio/sdk-python#496 ·
维护者通常 1 天内回复
-
[Bug] Heartbeat Task Slot information is not pulled when MetricBuffer is configured可能已有人在做 @Sushisource 于 26 天前认领。 未关闭bug
temporalio/sdk-python#1817 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Cloud CI Skips Nexus Tests可能重新可做 @tconley1428 于 54 天前认领,目前没有进行中的 PR。 未关闭
temporalio/sdk-python#1704 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
temporalio/sdk-python#1592 · 4 条评论 ·
维护者通常 1 天内回复
查看 temporalio/sdk-python 的全部 Issue
相似的 Issue
-
feature:LinkChecker
难度 2/5 1-3 小时 新手友好度 66/100
digitalfabrik/integreat-cms#4594 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
EleutherAI/lm-evaluation-harness#4319 ·
维护者通常 1 天内回复
-
needs triage
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
json_params_matcher fails on falsy top-level JSON primitives (0, False, "")可能已有人在做 @mayureshsonawane17 今天认领。 未关闭Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 5 天内回复