Skip to content

feat(billing): Add contract_id to GetUsageRequest - #554

Draft
dashed wants to merge 1 commit into
mainfrom
aleal/get-usage-contract-id
Draft

dashed wants to merge 1 commit into
mainfrom
aleal/get-usage-contract-id

Conversation

@dashed

@dashed dashed commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Bottom line: adds one optional field, contract_id, to GetUsageRequest (usage v1). A read that prices one contract names that contract. The seat days in the response then come only from that contract's on-demand period. Nothing sets the field until getsentry PR 23550 moves to it after a release.

  • Why it matters now: a pricing read can start in an earlier on-demand period. The seat read then returns that period's seat days too, and the same seats count twice (REVENG-803). The seats service needs the priced contract to know which period to keep.
  • What it does not do: it changes no existing field. A request that does not set contract_id reads as before. Event usage does not change.
  • Decision to review: one field on the existing request, not a new endpoint. The pricer and the invoicer already send this request, and only the seat part of the answer depends on the contract.

Part of REVENG-803

Checks

  • buf lint, buf format, buf breaking against main, cargo check, cargo clippy -D warnings and the Python tests (64) pass.
  • The Rust bindings are regenerated. Cargo.lock moves to 0.129.0, as make build-rust does after each release.
  • getsentry PR 23550 passes its tests with a local build of this branch.

A usage read that prices one contract names that contract. The seat
usage in the response then comes only from the contracts on that
contract's on-demand period. Event usage does not change.

The field is optional, so a request that names no contract reads as
before.
@linear-code

linear-code Bot commented Nov 24, 2026

Copy link
Copy Markdown

REVENG-803

@github-actions

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedNov 24, 2026, 3:42 PM

This branch has not been deployed

No deployments
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.

1 participant