-
-
Notifications
You must be signed in to change notification settings - Fork 442
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
Setry does not capture event if inited programatically with Spring boot starter #1339
Comments
Hi! Do you want to use trigger some events with one DSN and other events with other DSN or is the second DSN just to serve it to the frontend application? If you want to benefit from Spring integration, your workaround is a correct solution and I would not even consider it a workaround. |
Hi, the second is just passed to frontend, backend doesn't use it. I don't like there is the unnecessary property, but maybe I am just a nitpicker. So is the documentation wrong and I can't use the init method in my code as described? |
Another issue is, that when i don't provide the dsn in my
|
This
also fails:
So i really don't know, how to fix this. |
You cannot default to Sentry accepts empty string as a DSN - this will disable Sentry integration:
Spring integration is configured only if property |
You're right! I thought I did it so, but i edited wrong profile yaml. Thanks a lot! |
Great! 💪 |
Hi there,
I am building and app, where I need to configure both backend and frontend DSNs in my properties.yaml such as
That's why i don't want to use other configuration options such as "sentry.dsn" option.
I would like to init sentry in code as documentation says: https://docs.sentry.io/platforms/java/guides/spring-boot/configuration/
But when I do so, It doesn't capture anything. So maybe the documentation is wrong or I am doing something wrong.
I am calling the init method in my main Application class constructor.
If i provide "sentry.dsn", it works properly, so as a workaround I do this in my application.yaml
Should I call the Sentry.init method elsewhere? Or is there another reason why it doesn't work?
The text was updated successfully, but these errors were encountered: