Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
8.30
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
class ExampleService {
@SentryTraced()
async init() {
console.log(this.init.name) // should be "init", but is undefined.
}
}
Steps to Reproduce
- import sentry/nestjs
- add the SentryTraced decorator to any nestjs service function
- print the wrapped-function's name to the console.
Expected Result
I would expect the function to retain it's name when the SentryTraced decorator is used.
We rely heavily on the.fn.name
thoughout our codebase's logging.
Actual Result
using the SentryTraced decorator results in the class function instance having no accessible the.fn.name
property.
Metadata
Metadata
Assignees
Type
Projects
Status
Waiting for: Product Owner