-
-
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
feat: add SentryIsolationScope
decorator
#14845
Comments
SentryIsolationScope
decorator
@feelgood1987 thanks for the suggestion. You could make use of withScope or withIsolationScope wherever you need it – is there an advantage of putting that into a separate decorator for you? |
Will those methods work with non-HTTP requests, actually the service is a message-broker subscriber, and since I could understand from the documentation, that those methods, create scope based on an HTTP request, in our case, there be no HTTP request, will The reason, we've suggested having this new decorator, is the similar nature of the issue to something like |
Yeah this should not be http related. As for the decorator I would not see any benefit from it as it would not abstract any logic from the original |
As you've described, using
|
Problem Statement
Add a new decorator,
SentryIsolationScope
, to create and apply an isolation scope to the relevant method.Similar to the
SentryCron
orSentryTrace
decorators, this would be useful in situations where we don't have HTTP requests but still need an isolation scope.For instance, in our case, some MQ event consumers subscribe to a message broker like RabbitMQ. In such cases, there are no HTTP requests, so every Sentry.getIsolationScope call targets the global scope.
Having a decorator to create and assign an isolation scope to these functions would be a great feature for such use cases.
Solution Brainstorm
I've looked for a similar feature but unfortunately couldn't find any, so I've created this issue
The text was updated successfully, but these errors were encountered: