Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ message LineItemUsageSummary {
uint64 quantity = 3;

// Whether the usage pricer had to cap the spend based on the budget set by the contract
bool payg_budget_exhausted = 4;
bool payg_budget_exhausted = 4 [deprecated = true];

// false when this line item still has reserved quantity left.
// It's possible that PAYG is exhausted whereas reserved is not.
// Example: there's an overall PAYG budget of $10, a customer sends $10 worth of errors
// the payg_budget_exhausted field is true for all line items
// however, the plan still includes 5GB of free logs, so reserved_budget_exhausted is false for logs.
bool reserved_budget_exhausted = 5;
bool reserved_budget_exhausted = 5 [deprecated = true];

// Total units consumed by this line item in the billing period, including
// both reserved and PAYG usage (in the line item's units). Unlike `quantity`,
Expand All @@ -94,6 +94,11 @@ message LineItemUsageSummary {
// grants are applied, but before reserved quantity is deducted. This includes
// both reserved and PAYG usage (in the line item's units).
uint64 non_granted_quantity = 9;

// True when PAYG spend is greater than the budget.
// For example, a $1 allocation against a $1 budget returns false.
// For an all-items budget, compares the total spend across its line items.
bool exceeded_payg_budget = 10;
}

message SharedLineItemUsageSummary {
Expand All @@ -104,13 +109,16 @@ message SharedLineItemUsageSummary {
repeated LineItemUsageSummary line_item_summaries = 2;

// Whether the usage pricer had to cap the spend based on the budget set by the contract
bool payg_budget_exhausted = 3;
bool payg_budget_exhausted = 3 [deprecated = true];

// false when this pool still has reserved quantity left.
bool reserved_budget_exhausted = 4;
bool reserved_budget_exhausted = 4 [deprecated = true];

// True when any member of this pool can continue accepting usage.
bool has_remaining_capacity = 5;

// True when any member's PAYG spend is greater than its budget.
bool exceeded_payg_budget = 6;
}

// One project's per-day outcomes. Only days and line items with usage
Expand Down
12 changes: 12 additions & 0 deletions rust/src/sentry_protos.billing.v1.services.usage_pricer.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,15 @@ pub struct LineItemUsageSummary {
#[prost(uint64, tag = "3")]
pub quantity: u64,
/// Whether the usage pricer had to cap the spend based on the budget set by the contract
#[deprecated]
#[prost(bool, tag = "4")]
pub payg_budget_exhausted: bool,
/// false when this line item still has reserved quantity left.
/// It's possible that PAYG is exhausted whereas reserved is not.
/// Example: there's an overall PAYG budget of $10, a customer sends $10 worth of errors
/// the payg_budget_exhausted field is true for all line items
/// however, the plan still includes 5GB of free logs, so reserved_budget_exhausted is false for logs.
#[deprecated]
#[prost(bool, tag = "5")]
pub reserved_budget_exhausted: bool,
/// Total units consumed by this line item in the billing period, including
Expand All @@ -151,6 +153,11 @@ pub struct LineItemUsageSummary {
/// both reserved and PAYG usage (in the line item's units).
#[prost(uint64, tag = "9")]
pub non_granted_quantity: u64,
/// True when PAYG spend is greater than the budget.
/// For example, a $1 allocation against a $1 budget returns false.
/// For an all-items budget, compares the total spend across its line items.
#[prost(bool, tag = "10")]
pub exceeded_payg_budget: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SharedLineItemUsageSummary {
Expand All @@ -161,14 +168,19 @@ pub struct SharedLineItemUsageSummary {
#[prost(message, repeated, tag = "2")]
pub line_item_summaries: ::prost::alloc::vec::Vec<LineItemUsageSummary>,
/// Whether the usage pricer had to cap the spend based on the budget set by the contract
#[deprecated]
#[prost(bool, tag = "3")]
pub payg_budget_exhausted: bool,
/// false when this pool still has reserved quantity left.
#[deprecated]
#[prost(bool, tag = "4")]
pub reserved_budget_exhausted: bool,
/// True when any member of this pool can continue accepting usage.
#[prost(bool, tag = "5")]
pub has_remaining_capacity: bool,
/// True when any member's PAYG spend is greater than its budget.
#[prost(bool, tag = "6")]
pub exceeded_payg_budget: bool,
}
/// One project's per-day outcomes. Only days and line items with usage
/// are present; anything missing had no usage.
Expand Down
Loading