File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646 SENTRY_RELEASE : web@${{ github.sha }}
4747 VITE_SENTRY_DSN : ${{ vars.WEB_SENTRY_DSN }}
4848 VITE_SENTRY_RELEASE : web@${{ github.sha }}
49+
50+ - run : bun sst shell --stage=${{ github.ref_name }} -- bun run --cwd packages/stats/core db:migrate
51+ env :
52+ CLOUDFLARE_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
53+ PLANETSCALE_SERVICE_TOKEN_NAME : ${{ secrets.PLANETSCALE_SERVICE_TOKEN_NAME }}
54+ PLANETSCALE_SERVICE_TOKEN : ${{ secrets.PLANETSCALE_SERVICE_TOKEN }}
55+ STRIPE_SECRET_KEY : ${{ github.ref_name == 'production' && secrets.STRIPE_SECRET_KEY_PROD || secrets.STRIPE_SECRET_KEY_DEV }}
56+ HONEYCOMB_API_KEY : ${{ secrets.HONEYCOMB_API_KEY }}
57+ SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
58+ SENTRY_ORG : ${{ vars.SENTRY_ORG }}
59+ SENTRY_PROJECT : ${{ vars.WEB_SENTRY_PROJECT }}
60+ SENTRY_RELEASE : web@${{ github.sha }}
61+ VITE_SENTRY_DSN : ${{ vars.WEB_SENTRY_DSN }}
62+ VITE_SENTRY_RELEASE : web@${{ github.sha }}
Original file line number Diff line number Diff line change @@ -340,6 +340,7 @@ function ModelOverview(props: { data: StatsModelData | null }) {
340340 { ( data ) => (
341341 < div data-component = "model-metric-grid" >
342342 < MetricCard label = "Tokens" value = { formatTokens ( data ( ) . totals . tokens ) } detail = "last two months" />
343+ < MetricCard label = "Users" value = { formatUsers ( data ( ) . totals . users ) } detail = "unique users" />
343344 < MetricCard label = "Sessions" value = { formatInteger ( data ( ) . totals . sessions ) } detail = "completed sessions" />
344345 < MetricCard
345346 label = "Token Share"
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export type StatsModelData = {
5353 tokenChange : number
5454 totals : {
5555 sessions : number
56+ users : number
5657 tokens : number
5758 cost : number
5859 tokensPerSession : number
@@ -285,6 +286,7 @@ function buildStatsModelData(
285286 tokenChange : percentChange ( current . totalTokens , previous . totalTokens ) ,
286287 totals : {
287288 sessions : current . sessions ,
289+ users : current . uniqueUsers ,
288290 tokens : current . totalTokens ,
289291 cost : round ( microcentsToDollars ( current . totalCostMicrocents ) , 2 ) ,
290292 tokensPerSession : current . sessions > 0 ? Math . round ( current . totalTokens / current . sessions ) : 0 ,
You can’t perform that action at this time.
0 commit comments