From df0277d28b7038f9dc60bfa0e0367262d20d973e Mon Sep 17 00:00:00 2001 From: Alberto Leal Date: Thu, 12 Nov 2026 19:20:40 -0500 Subject: [PATCH 1/2] feat(billing): Add can_admin_product_trial to package line items Mark a line item or shared pool that staff can trial from the admin page, though customers cannot (Size Analysis). getsentry then reads it from the package config instead of the deprecated line_item_category. --- Cargo.lock | 2 +- .../billing/v1/services/package/v1/package.proto | 8 ++++++++ rust/src/sentry_protos.billing.v1.services.package.v1.rs | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 6a666a43..bb2775f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -717,7 +717,7 @@ checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "sentry_protos" -version = "0.119.0" +version = "0.120.0" dependencies = [ "prost", "prost-types", diff --git a/proto/sentry_protos/billing/v1/services/package/v1/package.proto b/proto/sentry_protos/billing/v1/services/package/v1/package.proto index 64440e58..659f6da4 100644 --- a/proto/sentry_protos/billing/v1/services/package/v1/package.proto +++ b/proto/sentry_protos/billing/v1/services/package/v1/package.proto @@ -39,6 +39,10 @@ message LineItemConfig { // Whether this LineItem is eligible for a product trial. bool can_product_trial = 12; + // Whether staff can start a product trial of this LineItem, though customers cannot (ie Size Analysis). + // Staff can also start a product trial of any LineItem with can_product_trial set. + bool can_admin_product_trial = 14; + sentry_protos.billing.v1.common.v1.BillingType billing_type = 13; } @@ -75,6 +79,10 @@ message SharedLineItemPool { // Whether this LineItem is eligible for a product trial. bool can_product_trial = 11; + + // Whether staff can start a product trial of this pool, though customers cannot. + // Staff can also start a product trial of any pool with can_product_trial set. + bool can_admin_product_trial = 12; } // Non-volume feature limits tied to a package tier (dashboards, metric diff --git a/rust/src/sentry_protos.billing.v1.services.package.v1.rs b/rust/src/sentry_protos.billing.v1.services.package.v1.rs index c303b761..357b7baf 100644 --- a/rust/src/sentry_protos.billing.v1.services.package.v1.rs +++ b/rust/src/sentry_protos.billing.v1.services.package.v1.rs @@ -29,6 +29,10 @@ pub struct LineItemConfig { /// Whether this LineItem is eligible for a product trial. #[prost(bool, tag = "12")] pub can_product_trial: bool, + /// Whether staff can start a product trial of this LineItem, though customers cannot (ie Size Analysis). + /// Staff can also start a product trial of any LineItem with can_product_trial set. + #[prost(bool, tag = "14")] + pub can_admin_product_trial: bool, #[prost(enumeration = "super::super::super::common::v1::BillingType", tag = "13")] pub billing_type: i32, /// how many of this lineitem are included in the package, the customer can reserve more on their contract @@ -107,6 +111,10 @@ pub struct SharedLineItemPool { /// Whether this LineItem is eligible for a product trial. #[prost(bool, tag = "11")] pub can_product_trial: bool, + /// Whether staff can start a product trial of this pool, though customers cannot. + /// Staff can also start a product trial of any pool with can_product_trial set. + #[prost(bool, tag = "12")] + pub can_admin_product_trial: bool, /// 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")] From 1c6faa206451aba120fefb2497d805f4f7576e41 Mon Sep 17 00:00:00 2001 From: Alberto Leal Date: Thu, 12 Nov 2026 19:38:24 -0500 Subject: [PATCH 2/2] docs(billing): Set at most one product trial flag per line item --- .../sentry_protos/billing/v1/services/package/v1/package.proto | 2 ++ rust/src/sentry_protos.billing.v1.services.package.v1.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/proto/sentry_protos/billing/v1/services/package/v1/package.proto b/proto/sentry_protos/billing/v1/services/package/v1/package.proto index 659f6da4..4fc8de9e 100644 --- a/proto/sentry_protos/billing/v1/services/package/v1/package.proto +++ b/proto/sentry_protos/billing/v1/services/package/v1/package.proto @@ -41,6 +41,7 @@ message LineItemConfig { // Whether staff can start a product trial of this LineItem, though customers cannot (ie Size Analysis). // Staff can also start a product trial of any LineItem with can_product_trial set. + // Set at most one of can_product_trial and can_admin_product_trial. bool can_admin_product_trial = 14; sentry_protos.billing.v1.common.v1.BillingType billing_type = 13; @@ -82,6 +83,7 @@ message SharedLineItemPool { // Whether staff can start a product trial of this pool, though customers cannot. // Staff can also start a product trial of any pool with can_product_trial set. + // Set at most one of can_product_trial and can_admin_product_trial. bool can_admin_product_trial = 12; } diff --git a/rust/src/sentry_protos.billing.v1.services.package.v1.rs b/rust/src/sentry_protos.billing.v1.services.package.v1.rs index 357b7baf..d79758a8 100644 --- a/rust/src/sentry_protos.billing.v1.services.package.v1.rs +++ b/rust/src/sentry_protos.billing.v1.services.package.v1.rs @@ -31,6 +31,7 @@ pub struct LineItemConfig { pub can_product_trial: bool, /// Whether staff can start a product trial of this LineItem, though customers cannot (ie Size Analysis). /// Staff can also start a product trial of any LineItem with can_product_trial set. + /// Set at most one of can_product_trial and can_admin_product_trial. #[prost(bool, tag = "14")] pub can_admin_product_trial: bool, #[prost(enumeration = "super::super::super::common::v1::BillingType", tag = "13")] @@ -113,6 +114,7 @@ pub struct SharedLineItemPool { pub can_product_trial: bool, /// Whether staff can start a product trial of this pool, though customers cannot. /// Staff can also start a product trial of any pool with can_product_trial set. + /// Set at most one of can_product_trial and can_admin_product_trial. #[prost(bool, tag = "12")] pub can_admin_product_trial: bool, /// How many units are available for a PackageConfig during a subscription trial? For packages that are not eligible for trials,