Source code not shown in Sentry next to stack trace
Integration
sentry-spring-boot-starter-jakarta
Java Version
21
Version
7.13.0
Environment
self-hosted running version 23.4.0
Steps to Reproduce
- Configure Sentry in my Spring Boot project, this is my
build.gradle.ktsconfiguration
plugins {
id("io.sentry.jvm.gradle") version "4.11.0"
}
dependencies {
implementation("io.sentry:sentry-spring-boot-starter-jakarta:7.13.0")
}
sentry {
includeSourceContext.set(true)
includeDependenciesReport.set(true)
autoUploadSourceContext.set(true)
autoInstallation {
enabled.set(true)
}
org.set("sentry")
projectName.set("my-project-name")
url.set("my-instance-url")
authToken.set("my-token")
}
- Write some code to trigger the error
- Do
./gradlew assembleso the sources are uploaded to Sentry (I can see them uploaded with the properdebug_id) - Run the application and force the error
Expected Result
- ✅ See the error in Sentry
- ❌ See the source code next to the stack trace as shown in https://docs.sentry.io/platforms/java/guides/spring-boot/source-context/
Example from the documentation mentioned above
Actual Result
After triggering an error, I only see the stack trace without any code around like in the example provided in the Sentry documentation
More (hopefully useful) information
Running the project locally I can see that the debug_id sent in the Sentry envelope when the exception is triggered matches the one uploaded as a debug file (I can see it uploaded successfully after running ./gradlew assemble)
{
"debug_meta": {
"images": [
{
"type": "jvm",
"debug_id": "8f6cf514-5aae-48d1-b99f-ad01df069460"
}
]
}
}
Debug file upload matching the debug_id
Hey @AlbertoCortina thanks for the report, we'll take a look and follow up here. Would you be able to share a link to the issue on sentry.io, either here or via email to [email protected]?
Hello @kahest, I can't provide a link on sentry.io because we are using a self-hosted instance. Just in case it matters, we're experiencing the issue while running Sentry version 24.7.1.
Hello @kahest,
We downgraded our instance to version 24.6.0, and everything is working as expected -- I can see the code next to the stack trace again. It might be worth checking the changes introduced between versions 24.6.0 and 24.7.1 that could be causing this issue.
@AlbertoCortina that's interesting, thanks for letting us know! We'll take a look. To clarify - do you repro the issue in 24.7.0 as well or only 24.7.1? Also in your original report you state self-hosted running version 23.4.0 - but that version is not affected?
Hi @AlbertoCortina,
Good to hear, that it works after downgrading.
However, I was unable to reproduce your problem with either 24.7.0 or 24.7.1 on my own self-hosted instance.
I set-up a simple controller and a service that throws a runtime exception and here's my build.gradle.kts:
plugins {
java
id("org.springframework.boot") version "3.3.2"
id("io.spring.dependency-management") version "1.1.5"
id("io.sentry.jvm.gradle") version "4.11.0"
}
group = "org.example"
version = "0.0.1-SNAPSHOT"
dependencies {
implementation("io.sentry:sentry-spring-boot-starter-jakarta:7.13.0")
implementation("org.springframework.boot:spring-boot-starter-web")
}
sentry {
includeSourceContext.set(true)
includeDependenciesReport.set(true)
autoUploadSourceContext.set(true)
autoInstallation {
enabled.set(true)
}
org.set("org")
projectName.set("project")
url.set("self-hosted-url")
authToken.set("token")
}
Would you be able to provide a minimal reproducible sample?
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 Waiting for: Community, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
+1, self hosted sentry v 24.7.1, source bundle is uploaded and debug id is sent, no source code is shown
"debug_meta": {
"images": [
{
"debug_id": "b1235361-8d90-4533-b403-b6610202f5bb",
"type": "jvm"
}
]
}