aws / aws/amazon-codeguru-profiler-python-agent
Profiling decorator overrides decorated function's name.
- Dominant language
- Python
- Stars
- 16
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
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:

The fix is minor, so I'll just create a PR for it here now.
Thanks
Contributor guide
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100