Skip to content

Commit 3b9887b

Browse files
romtsnclaude
authored andcommitted
docs(cli): Update bundle-jvm to reflect 3.4.x capabilities (#17521)
## Summary Updates the JVM source bundle docs to reflect the changes shipped in `sentry-cli` 3.4.0 ([#3260](getsentry/sentry-cli#3260)) and 3.4.1 ([#3275](getsentry/sentry-cli#3275)): - The path passed to `bundle-jvm` can now be a project or module root. `sentry-cli` filters by JVM extensions (`.java`, `.kt`, `.scala`, `.groovy`, `.clj`), skips common build output / IDE directories, and respects `.gitignore`. - Documents the `--exclude '<glob>'` flag, including the case where multiple source sets contribute the same fully-qualified class name (e.g. Android `src/main/` vs `src/debug/`) — `bundle-jvm` keeps the first occurrence and warns about the rest, and `--exclude` is the way to scope the bundle. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 76682ea commit 3b9887b

2 files changed

Lines changed: 21 additions & 5 deletions

File tree

docs/cli/dif.mdx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,24 @@ Before you can upload source files, you must configure the Sentry CLI with the o
258258

259259
### Creating a Source Bundle
260260

261-
Run the `debug-files bundle-jvm` command to create a source bundle for a
262-
source directory.
261+
Run the `debug-files bundle-jvm` command to create a source bundle. The path argument can be a single source directory, a module, or a Gradle/Maven project root — `sentry-cli` collects only JVM source files (`.java`, `.kt`, `.scala`, `.groovy`, `.clj`) and automatically skips common build output and IDE directories (`build`, `.gradle`, `.idea`, etc.) as well as anything matched by `.gitignore`.
263262

264263
```bash
265264
sentry-cli debug-files bundle-jvm \
266265
--output some/dir \
267266
--debug-id A_VALID_UUID \
268-
path/to/source/dir
267+
path/to/project/root
268+
```
269+
270+
Use `--exclude '<glob>'` (repeatable) to drop additional paths. This is useful when multiple source sets contribute the same fully-qualified class name — for example, an Android app where `src/main/` and `src/debug/` both define `com.example.Foo`. By default, `bundle-jvm` keeps the first occurrence and prints a warning for the rest; pass `--exclude` to scope the bundle to a single source set:
271+
272+
```bash
273+
sentry-cli debug-files bundle-jvm \
274+
--output some/dir \
275+
--debug-id A_VALID_UUID \
276+
--exclude '**/src/debug/**' \
277+
--exclude '**/src/release/**' \
278+
path/to/project/root
269279
```
270280

271281
You must provide the UUID of the source bundle for the Java/Android SDK to send.

platform-includes/source-context/java.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,18 @@ You can also use a `.sentryclirc` or a `.properties` file, which you can link us
329329

330330
### Creating the Source Bundle
331331

332-
First, create the source bundle containing your source files:
332+
First, create the source bundle containing your source files. The path can be a project or module root — `sentry-cli` collects JVM source files (`.java`, `.kt`, `.scala`, `.groovy`, `.clj`) and skips build output directories and `.gitignore`d paths automatically.
333333

334334
```
335-
sentry-cli debug-files bundle-jvm --output path/to/store/bundle --debug-id A_VALID_UUID path/to/source-code
335+
sentry-cli debug-files bundle-jvm --output path/to/store/bundle --debug-id A_VALID_UUID path/to/project/root
336336
```
337337

338+
<PlatformSection supported={["android"]}>
339+
340+
If multiple source sets in your project define the same fully-qualified class name (for example, when both `src/main/` and `src/debug/` contain `com.example.Foo`), `bundle-jvm` keeps the first occurrence and warns about the rest. Use `--exclude` to scope the bundle to a single source set — see [Debug Information Files](/cli/dif/#jvm-source-bundles) for details.
341+
342+
</PlatformSection>
343+
338344
### Uploading the Source Bundle
339345

340346
Next, upload that source bundle to Sentry:

0 commit comments

Comments
 (0)