Commit 8bf97c5
fix: attach OTEL javaagent directly in bootRunWithObservability
The previous approach set OTEL_JAVAAGENT_ENABLED via `environment` in a
doFirst block, but bootRun's System.getenv() check runs at Gradle
configuration time (before any task executes), so the javaagent flag was
never added. Fix by adding jvmArgs directly in the doFirst block.
Also clarify copyOtelAgent comment: it's a standalone helper for IntelliJ
run configurations, not used by bootRun or bootRunWithObservability.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent f66ffce commit 8bf97c5
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
302 | 305 | | |
303 | 306 | | |
304 | 307 | | |
| |||
317 | 320 | | |
318 | 321 | | |
319 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
320 | 329 | | |
321 | 330 | | |
322 | 331 | | |
| |||
0 commit comments