Skip to content

Commit

Permalink
feat(ai-monitoring): Show table even if there is no cost data (getsen…
Browse files Browse the repository at this point in the history
…try#70555)

If costs or token usage fail to load, still show the table with zero
values.
  • Loading branch information
colin-sentry authored May 9, 2024
1 parent 1e5349e commit 4003ba2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions static/app/views/aiMonitoring/PipelinesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,7 @@ export function PipelinesTable() {
referrer: 'api.ai-pipelines.view',
});

const {
data: tokensUsedData,
error: tokensUsedError,
isLoading: tokensUsedLoading,
} = useSpanMetrics({
const {data: tokensUsedData, isLoading: tokensUsedLoading} = useSpanMetrics({
search: new MutableSearch(
`span.category:ai span.ai.pipeline.group:[${(data as Row[])?.map(x => x['span.group']).join(',')}]`
),
Expand Down Expand Up @@ -185,7 +181,7 @@ export function PipelinesTable() {
/>
<GridEditable
isLoading={isLoading}
error={error ?? tokensUsedError}
error={error}
data={rows}
columnOrder={COLUMN_ORDER}
columnSortBy={[
Expand Down

0 comments on commit 4003ba2

Please sign in to comment.