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.

2 changes: 2 additions & 0 deletions proto/sentry_protos/billing/v1/data_category.proto
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ enum DataCategory {
DATA_CATEGORY_TRACE_METRIC_BYTE = 32;
// Usage based seer pricing
DATA_CATEGORY_SEER_USAGE_MICRO_CENTS = 33;
// Seer credits consumed by billable Seer features.
DATA_CATEGORY_BILLABLE_SEER_CREDITS = 34;
// Any other data category not known by this version.
DATA_CATEGORY_UNKNOWN = -1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
syntax = "proto3";

package sentry_protos.billing.v1.services.seer_feature_billing.v1;

message GetIsFreeSeerFeatureRequest {
// A Seer feature string, as recorded in LLM proxy cost data.
string feature_id = 1;
}

message GetIsFreeSeerFeatureResponse {
// True when usage of the feature is never billed for any organization.
bool is_free = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
syntax = "proto3";

package sentry_protos.billing.v1.services.seer_feature_billing.v1;

import "sentry_protos/billing/v1/data_category.proto";

message GetMappingRequest {}

message GetMappingResponse {
// Maps a Seer feature string, as recorded in LLM proxy cost data, to the
// data category its usage is billed under. Features absent from the map
// have no billing data category.
map<string, sentry_protos.billing.v1.DataCategory> data_category_by_feature = 1;
}
5 changes: 5 additions & 0 deletions rust/src/_include.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ pub mod sentry_protos {
include!("sentry_protos.billing.v1.services.seats.v1.rs");
}
}
pub mod seer_feature_billing {
pub mod v1 {
include!("sentry_protos.billing.v1.services.seer_feature_billing.v1.rs");
}
}
pub mod trial {
pub mod v1 {
include!("sentry_protos.billing.v1.services.trial.v1.rs");
Expand Down
4 changes: 4 additions & 0 deletions rust/src/sentry_protos.billing.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ pub enum DataCategory {
TraceMetricByte = 32,
/// Usage based seer pricing
SeerUsageMicroCents = 33,
/// Seer credits consumed by billable Seer features.
BillableSeerCredits = 34,
/// Any other data category not known by this version.
Unknown = -1,
}
Expand Down Expand Up @@ -112,6 +114,7 @@ impl DataCategory {
Self::ProfileUi => "DATA_CATEGORY_PROFILE_UI",
Self::TraceMetricByte => "DATA_CATEGORY_TRACE_METRIC_BYTE",
Self::SeerUsageMicroCents => "DATA_CATEGORY_SEER_USAGE_MICRO_CENTS",
Self::BillableSeerCredits => "DATA_CATEGORY_BILLABLE_SEER_CREDITS",
Self::Unknown => "DATA_CATEGORY_UNKNOWN",
}
}
Expand Down Expand Up @@ -150,6 +153,7 @@ impl DataCategory {
"DATA_CATEGORY_PROFILE_UI" => Some(Self::ProfileUi),
"DATA_CATEGORY_TRACE_METRIC_BYTE" => Some(Self::TraceMetricByte),
"DATA_CATEGORY_SEER_USAGE_MICRO_CENTS" => Some(Self::SeerUsageMicroCents),
"DATA_CATEGORY_BILLABLE_SEER_CREDITS" => Some(Self::BillableSeerCredits),
"DATA_CATEGORY_UNKNOWN" => Some(Self::Unknown),
_ => None,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetIsFreeSeerFeatureRequest {
/// A Seer feature string, as recorded in LLM proxy cost data.
#[prost(string, tag = "1")]
pub feature_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetIsFreeSeerFeatureResponse {
/// True when usage of the feature is never billed for any organization.
#[prost(bool, tag = "1")]
pub is_free: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetMappingRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMappingResponse {
/// Maps a Seer feature string, as recorded in LLM proxy cost data, to the
/// data category its usage is billed under. Features absent from the map
/// have no billing data category.
#[prost(map = "string, enumeration(super::super::super::DataCategory)", tag = "1")]
pub data_category_by_feature: ::std::collections::HashMap<
::prost::alloc::string::String,
i32,
>,
}
Loading