Skip to content

Conversation

@lcian
Copy link
Member

@lcian lcian commented Jan 23, 2026

Adds a many API that submits batch requests to the server.
The API is called many to indicate the fact that this can be interpreted as just a "hint" to use batching, but a many request from the user's pov doesn't necessarily map to a single batch request to the server.

This is a nice API when creating the requests but not so nice when retrieving the results, as the user will need to deal with wrapper types and different error types as well.

It should be kept in mind that most of the usage we expect here is from sentry-cli uploading multiple files. It's therefore quite unlikely that the user wants to inspect the result wrappers or anyways match on the errors, they most likely just care to know if all operations succeeded or not.

Motivated by the above reasons:

  • I introduced a error_for_failures function that's useful if you just want to know if all ops succeeded or not
  • As users are most interested in PUTs when using this API, I haven't thought about streaming the results of GET responses. We're just buffering the whole batch response with this implementation.

@lcian
Copy link
Member Author

lcian commented Jan 23, 2026

@sentry review

@github-actions
Copy link

github-actions bot commented Jan 23, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


No changelog entries will be generated from this PR.


🤖 This preview updates automatically when you update the PR.

@lcian
Copy link
Member Author

lcian commented Jan 23, 2026

@sentry review

@lcian lcian force-pushed the lcian/feat/batch-impl branch from 3f49d54 to d6dbeee Compare January 26, 2026 13:09
@lcian lcian force-pushed the lcian/feat/rust-batch-client branch 2 times, most recently from 4fbfd7f to 7f060c7 Compare January 27, 2026 12:34
@lcian lcian force-pushed the lcian/feat/rust-batch-client branch from 7f060c7 to bf71d9c Compare January 27, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants