Skip to content
Open
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
4 changes: 4 additions & 0 deletions src/hooks/productData/ai_observability.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export const aiObservability = {
description: 'Track costs, performance, and usage of your AI features',
handle: 'ai_observability',
type: 'ai_observability',
// The billing service still exposes this product under its original type
// (`llm_analytics`) from before the "AI Observability" rename. Billing data is
// joined on this value so pricing/calculator surfaces can find it.
billingType: 'llm_analytics',
slug: 'ai-observability',
color: 'purple',
colorSecondary: 'green-2',
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useCustomers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ const CUSTOMER_DATA: Record<string, BaseCustomer> = {
'product_analytics',
'session_replay',
'surveys',
'llm_analytics',
'ai_observability',
'warehouse_sources',
],
industries: ['Ad Tech', 'Hospitality', 'Digital Signage'],
Expand Down
6 changes: 5 additions & 1 deletion src/hooks/useProducts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ export default function useProducts() {

const [products, setProducts] = useState(
initialProducts.map((product) => {
// Products are joined to live billing data by type. A product can override
// the key the billing service uses via `billingType` (e.g. AI Observability
// is still `llm_analytics` upstream); otherwise the handle is the key.
const billingType = (product as { billingType?: string }).billingType || product.handle
const billingData =
product.billingData ||
billingProducts.find((billingProduct: any) => billingProduct.type === product.handle)
billingProducts.find((billingProduct: any) => billingProduct.type === billingType)
const paidPlan = billingData?.plans.find((plan: any) => plan.tiers)
const startsAt = paidPlan?.tiers?.find((tier: any) => tier.unit_amount_usd !== '0')?.unit_amount_usd
const freeLimit = paidPlan?.tiers?.find((tier: any) => tier.unit_amount_usd === '0')?.up_to
Expand Down
Loading