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 @@ -26,6 +26,13 @@ message LineItemConfig {

// Used for calculating spend that should not apply towards an organization's PAYG budget (ie Seer seats)
sentry_protos.billing.v1.common.v1.TieredPricingRate uncapped_rate = 9;

// How many units are available for a PackageConfig during a subscription trial? For packages that are not eligible for trials,
// this field will be unset for all line items.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm wondering if these fields now mean we cannot effectively inherit from dev to team to business packages, since we will need different trial units for team and business packages, and therefore have to redefine all line item configs

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow. Can we leave trial units empty on developer and just overwrite the values in business plans?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works fine as long as we only allow subscription trials for business, i thought we offer them for team plans as well which means we would need to define trial units differently for team/business packages.

oneof trial_units {
bool is_unlimited_trial = 10;
uint64 num_trial_units = 11;
}
Comment on lines +29 to +35

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need this? I think it would be a positive change to allow trials for any line item. Why would we want to restrict it and also have the package know about trials?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll let brendan confirm but i think the intention is to store the exact amount of units an org gets when they trial a specific package, that needs to be limited to a specific amount based on the package. we need to store this info(the reserved quotas per category for a trial of a specific package) somewhere, not sure what the best place is

@brendanhsentry brendanhsentry Jun 23, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be a positive change to allow trials for any line item.

Subscription trials have limited amounts of reserved quantity for each line item that users do not control. So when a subscription trial begins they get pre-determined reserved quantities for all line items. I needed a way to encode those specific limits in the code.

One option was to define these limits in the Engagement service, but that just felt like an extra file we'd need to update when launching a new line item. Defining it in the package proto also gives us the benefit of being able to enforce the fact that users can only trial specific plans (ie am3_business or am3_business_ent).

I'm ok with defining these trial limits as a constant in the engagement service for now and we can revisit later.

have the package know about trials?

From my perspective, the user is trialing a specific package (including its features, which we'll need to take into account at some point in the future) so it felt natural to include that as part of the package config.

}

// Represents a budget included in a package that is collectively used by one or more line items,
Expand All @@ -51,6 +58,13 @@ message SharedLineItemPool {
// Similar to LineItemConfig.reserved_rate, this field will hold the list of available reserved tiers for this line item
// as well as the prices for each respective tier.
sentry_protos.billing.v1.common.v1.TieredPricingRate reserved_tier = 8;

// How many units are available for a PackageConfig during a subscription trial? For packages that are not eligible for trials,
// this field will be unset for all line items.
oneof trial_units {
bool is_unlimited_trial = 9;
uint64 num_trial_units = 10;
}
}

message PackageConfig {
Expand Down
29 changes: 29 additions & 0 deletions rust/src/sentry_protos.billing.v1.services.package.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ pub struct LineItemConfig {
pub included_reserved_units: ::core::option::Option<
line_item_config::IncludedReservedUnits,
>,
/// How many units are available for a PackageConfig during a subscription trial? For packages that are not eligible for trials,
/// this field will be unset for all line items.
#[prost(oneof = "line_item_config::TrialUnits", tags = "10, 11")]
pub trial_units: ::core::option::Option<line_item_config::TrialUnits>,
}
/// Nested message and enum types in `LineItemConfig`.
pub mod line_item_config {
Expand All @@ -43,6 +47,15 @@ pub mod line_item_config {
#[prost(uint64, tag = "6")]
NumReservedUnits(u64),
}
/// How many units are available for a PackageConfig during a subscription trial? For packages that are not eligible for trials,
/// this field will be unset for all line items.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum TrialUnits {
#[prost(bool, tag = "10")]
IsUnlimitedTrial(bool),
#[prost(uint64, tag = "11")]
NumTrialUnits(u64),
}
}
/// Represents a budget included in a package that is collectively used by one or more line items,
/// allowing multiple line items to draw from the same reserved budget.
Expand Down Expand Up @@ -86,6 +99,22 @@ pub struct SharedLineItemPool {
pub reserved_tier: ::core::option::Option<
super::super::super::common::v1::TieredPricingRate,
>,
/// How many units are available for a PackageConfig during a subscription trial? For packages that are not eligible for trials,
/// this field will be unset for all line items.
#[prost(oneof = "shared_line_item_pool::TrialUnits", tags = "9, 10")]
pub trial_units: ::core::option::Option<shared_line_item_pool::TrialUnits>,
}
/// Nested message and enum types in `SharedLineItemPool`.
pub mod shared_line_item_pool {
/// How many units are available for a PackageConfig during a subscription trial? For packages that are not eligible for trials,
/// this field will be unset for all line items.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum TrialUnits {
#[prost(bool, tag = "9")]
IsUnlimitedTrial(bool),
#[prost(uint64, tag = "10")]
NumTrialUnits(u64),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PackageConfig {
Expand Down
Loading