-
-
Notifications
You must be signed in to change notification settings - Fork 427
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
DSN is required. Use empty string to disable SDK when building Native in Spring Boot #2742
Comments
i got this error when i set debug to a string value instead of a bool recently |
@JakobStadlhuber please let us know if @bj97301's comment helped to fix your problem. |
Can we get a better error message for this though? |
@bj97301 we'll look into improving the error message. |
No, I use no debugging and the problem still appears:
I tried it with |
@JakobStadlhuber can you please try without |
Could you please also give the following a try:
|
This could be related to AOP. When I tried some possible fixes while on the branch for #2764 I wasn't able to fix it. Need to check if disabling all AOP related things gets rid of the problem. |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Are there any news on this? |
Hello @JakobStadlhuber not yet. Working on something else at the moment. Can't say yet when I'll get to this - sorry. |
Hi @JakobStadlhuber, In order to then successfully run it, it is still required to create the .json hint files for reflection, proxies etc. There's a java agent that automatically creates these for you. Documentation on that can be found here: https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html#native-image.advanced.using-the-tracing-agent. Looking forward to your feedback. |
Hello, I am using the I ended up setting debug based on the environment, so it's always a boolean. Just wanted to share my experience here. |
Let's keep this open until we have some feedback. |
@JakobStadlhuber can you please retest with |
Yes it works, thank you :) |
Integration
sentry
Java Version
17
Spring Boot Version
3.0.7
and plugin with id("org.graalvm.buildtools.native") version "0.9.20"
I tried it on an M1 with this additional option:
kotlin tasks.withType<org.springframework.boot.gradle.tasks.bundling.BootBuildImage> { if (org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentArchitecture().isArm) { builder.set("dashaun/builder-arm:tiny") } }
Version
6.20.0 (logback, sentry-jdbc, sentry-spring-boot-starter-jakarta)
Steps to Reproduce
gradle bootBuildImage
Expected Result
No error when building the native image
Actual Result
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sentryTransactionAdvice' defined in class path resource [io/sentry/spring/jakarta/tracing/SentryAdviceConfiguration.class]: Unsatisfied dependency expressed through method 'sentryTransactionAdvice' parameter 0: Error creating bean with name 'sentryHub' defined in class path resource [io/sentry/spring/boot/jakarta/SentryAutoConfiguration$HubConfiguration.class]: Failed to instantiate [io.sentry.IHub]: Factory method 'sentryHub' threw exception with message: DSN is required. Use empty string to disable SDK.
The text was updated successfully, but these errors were encountered: