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

貢獻指南

開啟貢獻指南

研究方向

從 with_lambda_profiler 裝飾器開始,檢查它如何包裝被裝飾的函式。確認原始函式名稱獲得保留,然後執行相關的專案測試,並驗證 profiling 和回報的函式名稱仍如預期運作。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
aws, python
領域
observability
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。