-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WithSpan
et WithScope
decorators
#11353
Comments
Hey @jeengbe thx for the suggestions!
So technically yes, this would be a nice feature. However, we didn't add decorators yet because decorators are not used widely and there are multiple different experimental stages (TS If decorators work fine in your setup, I suggest to write them yourself. Might even be a nice idea to publish them. Maybe in a distant future, we can add such decorators to the SDK.
This is unfortunately a bit of a rabbit hole for us but we decided against I'm going to close this issue for the time being because I don't think we can actionably incorporate these suggestions at the moment. Feel free to ping me if you think this should be reopened. Thanks! |
Interesting to see the proposal differ from TS' implementation. I was not aware. Regardless, a missing standard is a counter-argument strong enough. |
Problem Statement
It is a lot more convenient to attach decorators to class methods than to wrap their contents in a callback and bump up nesting by one or two.
vs.
Also, should
Sentry.startSpan()
not be namedSentry.withSpan()
?Solution Brainstorm
Rudimentary span implementation:
The text was updated successfully, but these errors were encountered: