aws / aws/amazon-codeguru-profiler-python-agent

Profiling decorator overrides decorated function's name.

未关闭
#51 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
16
派生
12
PR 合并指标
30 天内没有已合并 PR

描述

Hi all,

Found a small issue that has been bothering me for a while, so finally took the time to create an issue + PR.

When you use the `with_lambda_profiler` decorator, it overrides the name of the function with `profiler_decorate`. Normally this isn't very visible, but if you are using XRay as well, it becomes painfully obvious, as per this screenshot:

![Cursor_and_CloudWatch___us-west-2](https://github.com/aws/amazon-codeguru-profiler-python-agent/assets/700257/6aa5e32c-2021-4434-b201-1a1649da370c)

The fix is minor, so I'll just create a PR for it here now.

Thanks

贡献指南

打开贡献指南

调研方向

Start at the with_lambda_profiler decorator and inspect how it wraps the decorated function. Confirm that the original function name is preserved, then run the relevant project tests and verify that profiling and the reported function name still work as expected.

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

评估

技术栈
aws, python
领域
observability
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

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