Skip to content

Commit 801dacf

Browse files
fix(dashboards): Update AI prebuilt dashboards to use response model instead of request model (#112498)
fixes #111700
1 parent 51a816b commit 801dacf

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

static/app/views/dashboards/utils/prebuiltConfigs/ai/aiAgentsModels.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ const FIRST_ROW_WIDGETS = spaceWidgetsEquallyOnRow(
2323
name: '',
2424
conditions: AI_GENERATIONS_FILTER,
2525
fields: [
26-
SpanFields.GEN_AI_REQUEST_MODEL,
26+
SpanFields.GEN_AI_RESPONSE_MODEL,
2727
`sum(${SpanFields.GEN_AI_COST_TOTAL_TOKENS})`,
2828
],
2929
aggregates: [`sum(${SpanFields.GEN_AI_COST_TOTAL_TOKENS})`],
30-
columns: [SpanFields.GEN_AI_REQUEST_MODEL],
30+
columns: [SpanFields.GEN_AI_RESPONSE_MODEL],
3131
fieldAliases: [t('Model'), t('Total Cost')],
3232
orderby: `-sum(${SpanFields.GEN_AI_COST_TOTAL_TOKENS})`,
3333
},
@@ -46,11 +46,11 @@ const FIRST_ROW_WIDGETS = spaceWidgetsEquallyOnRow(
4646
name: '',
4747
conditions: AI_GENERATIONS_FILTER,
4848
fields: [
49-
SpanFields.GEN_AI_REQUEST_MODEL,
49+
SpanFields.GEN_AI_RESPONSE_MODEL,
5050
`sum(${SpanFields.GEN_AI_USAGE_TOTAL_TOKENS})`,
5151
],
5252
aggregates: [`sum(${SpanFields.GEN_AI_USAGE_TOTAL_TOKENS})`],
53-
columns: [SpanFields.GEN_AI_REQUEST_MODEL],
53+
columns: [SpanFields.GEN_AI_RESPONSE_MODEL],
5454
fieldAliases: [t('Model'), t('Total Tokens')],
5555
orderby: `-sum(${SpanFields.GEN_AI_USAGE_TOTAL_TOKENS})`,
5656
},
@@ -108,7 +108,7 @@ const MODELS_TABLE = {
108108
name: '',
109109
conditions: AI_GENERATIONS_FILTER,
110110
fields: [
111-
SpanFields.GEN_AI_REQUEST_MODEL,
111+
SpanFields.GEN_AI_RESPONSE_MODEL,
112112
'count()',
113113
'equation|count_if(span.status,equals,internal_error)',
114114
`avg(${SpanFields.SPAN_DURATION})`,
@@ -130,7 +130,7 @@ const MODELS_TABLE = {
130130
`sum(${SpanFields.GEN_AI_USAGE_OUTPUT_TOKENS})`,
131131
`sum(${SpanFields.GEN_AI_USAGE_OUTPUT_TOKENS_REASONING})`,
132132
],
133-
columns: [SpanFields.GEN_AI_REQUEST_MODEL],
133+
columns: [SpanFields.GEN_AI_RESPONSE_MODEL],
134134
fieldAliases: [
135135
t('Model'),
136136
t('Requests'),
@@ -164,8 +164,8 @@ export const AI_AGENTS_MODELS_PREBUILT_CONFIG: PrebuiltDashboard = {
164164
{
165165
dataset: WidgetType.SPANS,
166166
tag: {
167-
key: 'gen_ai.request.model',
168-
name: 'gen_ai.request.model',
167+
key: 'gen_ai.response.model',
168+
name: 'gen_ai.response.model',
169169
kind: FieldKind.TAG,
170170
},
171171
value: '',

static/app/views/dashboards/utils/prebuiltConfigs/ai/aiAgentsOverview.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,18 @@ const SECOND_ROW_WIDGETS = spaceWidgetsEquallyOnRow(
119119
{
120120
name: '',
121121
conditions: AI_CLIENT_FILTER,
122-
fields: [SpanFields.GEN_AI_REQUEST_MODEL, `count(${SpanFields.SPAN_DURATION})`],
122+
fields: [
123+
SpanFields.GEN_AI_RESPONSE_MODEL,
124+
`count(${SpanFields.SPAN_DURATION})`,
125+
],
123126
aggregates: [`count(${SpanFields.SPAN_DURATION})`],
124-
columns: [SpanFields.GEN_AI_REQUEST_MODEL],
127+
columns: [SpanFields.GEN_AI_RESPONSE_MODEL],
125128
fieldAliases: [t('Model'), t('Calls')],
126129
orderby: `-count(${SpanFields.SPAN_DURATION})`,
127130
linkedDashboards: [
128131
{
129132
dashboardId: '-1',
130-
field: SpanFields.GEN_AI_REQUEST_MODEL,
133+
field: SpanFields.GEN_AI_RESPONSE_MODEL,
131134
staticDashboardId: 17,
132135
},
133136
],
@@ -147,17 +150,17 @@ const SECOND_ROW_WIDGETS = spaceWidgetsEquallyOnRow(
147150
name: '',
148151
conditions: AI_CLIENT_FILTER,
149152
fields: [
150-
SpanFields.GEN_AI_REQUEST_MODEL,
153+
SpanFields.GEN_AI_RESPONSE_MODEL,
151154
`sum(${SpanFields.GEN_AI_USAGE_TOTAL_TOKENS})`,
152155
],
153156
aggregates: [`sum(${SpanFields.GEN_AI_USAGE_TOTAL_TOKENS})`],
154-
columns: [SpanFields.GEN_AI_REQUEST_MODEL],
157+
columns: [SpanFields.GEN_AI_RESPONSE_MODEL],
155158
fieldAliases: [t('Model'), t('Total Tokens')],
156159
orderby: `-sum(${SpanFields.GEN_AI_USAGE_TOTAL_TOKENS})`,
157160
linkedDashboards: [
158161
{
159162
dashboardId: '-1',
160-
field: SpanFields.GEN_AI_REQUEST_MODEL,
163+
field: SpanFields.GEN_AI_RESPONSE_MODEL,
161164
staticDashboardId: 17,
162165
},
163166
],

0 commit comments

Comments
 (0)