-
I'm working on upgrading from Sentry Java 1.x to Sentry Java 6.x and I've been using dependency inject to inject my SentryClient into classes. In the past, it was easy. Now, There appears to be no public way to get an What is the recommended way to dependency inject a SentryClient? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @ajacques how about injecting Are you planning on using multiple Sentry projects / DSNs to send data to from a single app? If no, there should be no need to deal with clients directly.
Can you please link the docs page? |
Beta Was this translation helpful? Give feedback.
Hello @ajacques how about injecting
IHub
instances into your classes? You could useHubAdapter
to forward toSentry
static method calls in case this is just for making your application more easily testable and mocking Sentry.Are you planning on using multiple Sentry projects / DSNs to send data to from a single app? If no, there should be no need to deal with clients directly.
Can you please link the docs page?