toad-eye 2.4.5 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +1 -1
  2. package/dist/agent.js +6 -2
  3. package/dist/context/error.d.ts +15 -0
  4. package/dist/context/error.js +17 -0
  5. package/dist/context/guard.d.ts +8 -0
  6. package/dist/context/guard.js +41 -0
  7. package/dist/context/index.d.ts +2 -0
  8. package/dist/context/index.js +2 -0
  9. package/dist/core/metrics.d.ts +4 -1
  10. package/dist/core/metrics.js +32 -2
  11. package/dist/core/pricing.d.ts +2 -0
  12. package/dist/core/pricing.js +51 -15
  13. package/dist/core/spans.js +27 -2
  14. package/dist/core/tracer.js +2 -0
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.js +1 -0
  17. package/dist/instrumentations/anthropic.js +8 -2
  18. package/dist/instrumentations/create.js +47 -3
  19. package/dist/instrumentations/types.d.ts +2 -0
  20. package/dist/types/attributes.d.ts +1 -0
  21. package/dist/types/attributes.js +1 -0
  22. package/dist/types/config.d.ts +7 -0
  23. package/dist/types/metrics.d.ts +3 -0
  24. package/dist/types/metrics.js +4 -0
  25. package/dist/types/spans.d.ts +4 -0
  26. package/package.json +1 -1
  27. package/templates/grafana/dashboards/agent-workflow.json +154 -31
  28. package/templates/grafana/dashboards/cost-breakdown.json +168 -40
  29. package/templates/grafana/dashboards/error-drilldown.json +155 -37
  30. package/templates/grafana/dashboards/finops-attribution.json +192 -43
  31. package/templates/grafana/dashboards/latency-analysis.json +103 -24
  32. package/templates/grafana/dashboards/llm-overview.json +268 -66
  33. package/templates/grafana/dashboards/model-comparison.json +119 -26
  34. package/templates/grafana/dashboards/provider-health.json +137 -31
@@ -1,5 +1,7 @@
1
1
  {
2
- "annotations": { "list": [] },
2
+ "annotations": {
3
+ "list": []
4
+ },
3
5
  "editable": true,
4
6
  "fiscalYearStartMonth": 0,
5
7
  "graphTooltip": 1,
@@ -9,8 +11,16 @@
9
11
  {
10
12
  "title": "Avg Steps per Query",
11
13
  "type": "stat",
12
- "gridPos": { "h": 4, "w": 6, "x": 0, "y": 0 },
13
- "datasource": { "type": "prometheus", "uid": "prometheus" },
14
+ "gridPos": {
15
+ "h": 4,
16
+ "w": 6,
17
+ "x": 0,
18
+ "y": 0
19
+ },
20
+ "datasource": {
21
+ "type": "prometheus",
22
+ "uid": "prometheus"
23
+ },
14
24
  "targets": [
15
25
  {
16
26
  "expr": "sum(gen_ai_agent_steps_per_query_sum) / sum(gen_ai_agent_steps_per_query_count) or vector(0)",
@@ -23,9 +33,18 @@
23
33
  "decimals": 1,
24
34
  "thresholds": {
25
35
  "steps": [
26
- { "color": "green", "value": null },
27
- { "color": "yellow", "value": 10 },
28
- { "color": "red", "value": 20 }
36
+ {
37
+ "color": "green",
38
+ "value": null
39
+ },
40
+ {
41
+ "color": "yellow",
42
+ "value": 10
43
+ },
44
+ {
45
+ "color": "red",
46
+ "value": 20
47
+ }
29
48
  ]
30
49
  }
31
50
  },
@@ -35,8 +54,16 @@
35
54
  {
36
55
  "title": "Total Agent Queries",
37
56
  "type": "stat",
38
- "gridPos": { "h": 4, "w": 6, "x": 6, "y": 0 },
39
- "datasource": { "type": "prometheus", "uid": "prometheus" },
57
+ "gridPos": {
58
+ "h": 4,
59
+ "w": 6,
60
+ "x": 6,
61
+ "y": 0
62
+ },
63
+ "datasource": {
64
+ "type": "prometheus",
65
+ "uid": "prometheus"
66
+ },
40
67
  "targets": [
41
68
  {
42
69
  "expr": "sum(gen_ai_agent_steps_per_query_count)",
@@ -44,15 +71,25 @@
44
71
  }
45
72
  ],
46
73
  "fieldConfig": {
47
- "defaults": { "unit": "short" },
74
+ "defaults": {
75
+ "unit": "short"
76
+ },
48
77
  "overrides": []
49
78
  }
50
79
  },
51
80
  {
52
81
  "title": "Total Tool Invocations",
53
82
  "type": "stat",
54
- "gridPos": { "h": 4, "w": 6, "x": 12, "y": 0 },
55
- "datasource": { "type": "prometheus", "uid": "prometheus" },
83
+ "gridPos": {
84
+ "h": 4,
85
+ "w": 6,
86
+ "x": 12,
87
+ "y": 0
88
+ },
89
+ "datasource": {
90
+ "type": "prometheus",
91
+ "uid": "prometheus"
92
+ },
56
93
  "targets": [
57
94
  {
58
95
  "expr": "sum(gen_ai_agent_tool_usage_total)",
@@ -60,15 +97,25 @@
60
97
  }
61
98
  ],
62
99
  "fieldConfig": {
63
- "defaults": { "unit": "short" },
100
+ "defaults": {
101
+ "unit": "short"
102
+ },
64
103
  "overrides": []
65
104
  }
66
105
  },
67
106
  {
68
107
  "title": "Unique Tools Used",
69
108
  "type": "stat",
70
- "gridPos": { "h": 4, "w": 6, "x": 18, "y": 0 },
71
- "datasource": { "type": "prometheus", "uid": "prometheus" },
109
+ "gridPos": {
110
+ "h": 4,
111
+ "w": 6,
112
+ "x": 18,
113
+ "y": 0
114
+ },
115
+ "datasource": {
116
+ "type": "prometheus",
117
+ "uid": "prometheus"
118
+ },
72
119
  "targets": [
73
120
  {
74
121
  "expr": "count(count by (gen_ai_agent_tool_name) (gen_ai_agent_tool_usage_total))",
@@ -76,7 +123,9 @@
76
123
  }
77
124
  ],
78
125
  "fieldConfig": {
79
- "defaults": { "unit": "short" },
126
+ "defaults": {
127
+ "unit": "short"
128
+ },
80
129
  "overrides": []
81
130
  }
82
131
  },
@@ -84,8 +133,16 @@
84
133
  "title": "Agent Step Type Breakdown",
85
134
  "description": "Distribution of think / act / observe / answer steps",
86
135
  "type": "piechart",
87
- "gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 },
88
- "datasource": { "type": "prometheus", "uid": "prometheus" },
136
+ "gridPos": {
137
+ "h": 8,
138
+ "w": 12,
139
+ "x": 0,
140
+ "y": 4
141
+ },
142
+ "datasource": {
143
+ "type": "prometheus",
144
+ "uid": "prometheus"
145
+ },
89
146
  "targets": [
90
147
  {
91
148
  "expr": "sum by (gen_ai_agent_step_type) (gen_ai_agent_steps_per_query_sum)",
@@ -106,8 +163,16 @@
106
163
  "title": "Tool Usage Frequency",
107
164
  "description": "Invocations per tool name",
108
165
  "type": "barchart",
109
- "gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 },
110
- "datasource": { "type": "prometheus", "uid": "prometheus" },
166
+ "gridPos": {
167
+ "h": 8,
168
+ "w": 12,
169
+ "x": 12,
170
+ "y": 4
171
+ },
172
+ "datasource": {
173
+ "type": "prometheus",
174
+ "uid": "prometheus"
175
+ },
111
176
  "targets": [
112
177
  {
113
178
  "expr": "sort_desc(sum by (gen_ai_agent_tool_name) (gen_ai_agent_tool_usage_total))",
@@ -119,8 +184,16 @@
119
184
  {
120
185
  "title": "Steps per Query Over Time",
121
186
  "type": "timeseries",
122
- "gridPos": { "h": 8, "w": 24, "x": 0, "y": 12 },
123
- "datasource": { "type": "prometheus", "uid": "prometheus" },
187
+ "gridPos": {
188
+ "h": 8,
189
+ "w": 24,
190
+ "x": 0,
191
+ "y": 12
192
+ },
193
+ "datasource": {
194
+ "type": "prometheus",
195
+ "uid": "prometheus"
196
+ },
124
197
  "targets": [
125
198
  {
126
199
  "expr": "sum(rate(gen_ai_agent_steps_per_query_sum[5m])) / sum(rate(gen_ai_agent_steps_per_query_count[5m]))",
@@ -136,7 +209,9 @@
136
209
  "fieldConfig": {
137
210
  "defaults": {
138
211
  "unit": "short",
139
- "custom": { "fillOpacity": 10 }
212
+ "custom": {
213
+ "fillOpacity": 10
214
+ }
140
215
  },
141
216
  "overrides": []
142
217
  }
@@ -144,8 +219,16 @@
144
219
  {
145
220
  "title": "Tool Invocations Over Time",
146
221
  "type": "timeseries",
147
- "gridPos": { "h": 8, "w": 12, "x": 0, "y": 20 },
148
- "datasource": { "type": "prometheus", "uid": "prometheus" },
222
+ "gridPos": {
223
+ "h": 8,
224
+ "w": 12,
225
+ "x": 0,
226
+ "y": 20
227
+ },
228
+ "datasource": {
229
+ "type": "prometheus",
230
+ "uid": "prometheus"
231
+ },
149
232
  "targets": [
150
233
  {
151
234
  "expr": "sum by (gen_ai_agent_tool_name) (rate(gen_ai_agent_tool_usage_total[5m]))",
@@ -156,7 +239,12 @@
156
239
  "fieldConfig": {
157
240
  "defaults": {
158
241
  "unit": "reqps",
159
- "custom": { "fillOpacity": 20, "stacking": { "mode": "normal" } }
242
+ "custom": {
243
+ "fillOpacity": 20,
244
+ "stacking": {
245
+ "mode": "normal"
246
+ }
247
+ }
160
248
  },
161
249
  "overrides": []
162
250
  }
@@ -165,8 +253,16 @@
165
253
  "title": "Steps Distribution Histogram",
166
254
  "description": "How many steps do agent queries typically take?",
167
255
  "type": "histogram",
168
- "gridPos": { "h": 8, "w": 12, "x": 12, "y": 20 },
169
- "datasource": { "type": "prometheus", "uid": "prometheus" },
256
+ "gridPos": {
257
+ "h": 8,
258
+ "w": 12,
259
+ "x": 12,
260
+ "y": 20
261
+ },
262
+ "datasource": {
263
+ "type": "prometheus",
264
+ "uid": "prometheus"
265
+ },
170
266
  "targets": [
171
267
  {
172
268
  "expr": "sum by (le) (gen_ai_agent_steps_per_query_bucket)",
@@ -176,7 +272,9 @@
176
272
  ],
177
273
  "fieldConfig": {
178
274
  "defaults": {
179
- "custom": { "fillOpacity": 80 }
275
+ "custom": {
276
+ "fillOpacity": 80
277
+ }
180
278
  },
181
279
  "overrides": []
182
280
  }
@@ -186,19 +284,44 @@
186
284
  "tags": ["toad-eye", "agent"],
187
285
  "templating": {
188
286
  "list": [
287
+ {
288
+ "name": "service",
289
+ "type": "query",
290
+ "datasource": {
291
+ "type": "prometheus",
292
+ "uid": "prometheus"
293
+ },
294
+ "query": "label_values(gen_ai_client_requests_total, job)",
295
+ "includeAll": true,
296
+ "allValue": ".*",
297
+ "current": {
298
+ "text": "All",
299
+ "value": "$__all"
300
+ },
301
+ "multi": true
302
+ },
189
303
  {
190
304
  "name": "tool",
191
305
  "type": "query",
192
- "datasource": { "type": "prometheus", "uid": "prometheus" },
306
+ "datasource": {
307
+ "type": "prometheus",
308
+ "uid": "prometheus"
309
+ },
193
310
  "query": "label_values(gen_ai_agent_tool_usage_total, gen_ai_agent_tool_name)",
194
311
  "includeAll": true,
195
312
  "multi": true,
196
- "current": { "text": "All", "value": "$__all" },
313
+ "current": {
314
+ "text": "All",
315
+ "value": "$__all"
316
+ },
197
317
  "regex": ""
198
318
  }
199
319
  ]
200
320
  },
201
- "time": { "from": "now-6h", "to": "now" },
321
+ "time": {
322
+ "from": "now-6h",
323
+ "to": "now"
324
+ },
202
325
  "timepicker": {},
203
326
  "timezone": "utc",
204
327
  "title": "toad-eye / Agent Workflow",
@@ -1,5 +1,7 @@
1
1
  {
2
- "annotations": { "list": [] },
2
+ "annotations": {
3
+ "list": []
4
+ },
3
5
  "editable": true,
4
6
  "fiscalYearStartMonth": 0,
5
7
  "graphTooltip": 1,
@@ -9,11 +11,19 @@
9
11
  {
10
12
  "title": "Total Cost",
11
13
  "type": "stat",
12
- "gridPos": { "h": 4, "w": 8, "x": 0, "y": 0 },
13
- "datasource": { "type": "prometheus", "uid": "prometheus" },
14
+ "gridPos": {
15
+ "h": 4,
16
+ "w": 8,
17
+ "x": 0,
18
+ "y": 0
19
+ },
20
+ "datasource": {
21
+ "type": "prometheus",
22
+ "uid": "prometheus"
23
+ },
14
24
  "targets": [
15
25
  {
16
- "expr": "sum(gen_ai_client_request_cost_USD_sum{gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"})",
26
+ "expr": "sum(gen_ai_client_request_cost_USD_sum{job=~\"$service\", gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"})",
17
27
  "refId": "A"
18
28
  }
19
29
  ],
@@ -22,9 +32,18 @@
22
32
  "unit": "currencyUSD",
23
33
  "thresholds": {
24
34
  "steps": [
25
- { "color": "green", "value": null },
26
- { "color": "yellow", "value": 50 },
27
- { "color": "red", "value": 500 }
35
+ {
36
+ "color": "green",
37
+ "value": null
38
+ },
39
+ {
40
+ "color": "yellow",
41
+ "value": 50
42
+ },
43
+ {
44
+ "color": "red",
45
+ "value": 500
46
+ }
28
47
  ]
29
48
  }
30
49
  },
@@ -34,11 +53,19 @@
34
53
  {
35
54
  "title": "Cost Today",
36
55
  "type": "stat",
37
- "gridPos": { "h": 4, "w": 8, "x": 8, "y": 0 },
38
- "datasource": { "type": "prometheus", "uid": "prometheus" },
56
+ "gridPos": {
57
+ "h": 4,
58
+ "w": 8,
59
+ "x": 8,
60
+ "y": 0
61
+ },
62
+ "datasource": {
63
+ "type": "prometheus",
64
+ "uid": "prometheus"
65
+ },
39
66
  "targets": [
40
67
  {
41
- "expr": "sum(increase(gen_ai_client_request_cost_USD_sum{gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[1d]))",
68
+ "expr": "sum(increase(gen_ai_client_request_cost_USD_sum{job=~\"$service\", gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[1d]))",
42
69
  "refId": "A"
43
70
  }
44
71
  ],
@@ -47,9 +74,18 @@
47
74
  "unit": "currencyUSD",
48
75
  "thresholds": {
49
76
  "steps": [
50
- { "color": "green", "value": null },
51
- { "color": "yellow", "value": 10 },
52
- { "color": "red", "value": 50 }
77
+ {
78
+ "color": "green",
79
+ "value": null
80
+ },
81
+ {
82
+ "color": "yellow",
83
+ "value": 10
84
+ },
85
+ {
86
+ "color": "red",
87
+ "value": 50
88
+ }
53
89
  ]
54
90
  }
55
91
  },
@@ -59,11 +95,19 @@
59
95
  {
60
96
  "title": "Projected Monthly Cost",
61
97
  "type": "stat",
62
- "gridPos": { "h": 4, "w": 8, "x": 16, "y": 0 },
63
- "datasource": { "type": "prometheus", "uid": "prometheus" },
98
+ "gridPos": {
99
+ "h": 4,
100
+ "w": 8,
101
+ "x": 16,
102
+ "y": 0
103
+ },
104
+ "datasource": {
105
+ "type": "prometheus",
106
+ "uid": "prometheus"
107
+ },
64
108
  "targets": [
65
109
  {
66
- "expr": "sum(rate(gen_ai_client_request_cost_USD_sum{gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[1d])) * 86400 * 30",
110
+ "expr": "sum(rate(gen_ai_client_request_cost_USD_sum{job=~\"$service\", gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[1d])) * 86400 * 30",
67
111
  "refId": "A"
68
112
  }
69
113
  ],
@@ -72,9 +116,18 @@
72
116
  "unit": "currencyUSD",
73
117
  "thresholds": {
74
118
  "steps": [
75
- { "color": "green", "value": null },
76
- { "color": "yellow", "value": 100 },
77
- { "color": "red", "value": 1000 }
119
+ {
120
+ "color": "green",
121
+ "value": null
122
+ },
123
+ {
124
+ "color": "yellow",
125
+ "value": 100
126
+ },
127
+ {
128
+ "color": "red",
129
+ "value": 1000
130
+ }
78
131
  ]
79
132
  }
80
133
  },
@@ -84,11 +137,19 @@
84
137
  {
85
138
  "title": "Cost by Provider",
86
139
  "type": "timeseries",
87
- "gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 },
88
- "datasource": { "type": "prometheus", "uid": "prometheus" },
140
+ "gridPos": {
141
+ "h": 8,
142
+ "w": 12,
143
+ "x": 0,
144
+ "y": 4
145
+ },
146
+ "datasource": {
147
+ "type": "prometheus",
148
+ "uid": "prometheus"
149
+ },
89
150
  "targets": [
90
151
  {
91
- "expr": "sum(rate(gen_ai_client_request_cost_USD_sum{gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[1m])) by (gen_ai_provider_name) * 60",
152
+ "expr": "sum(rate(gen_ai_client_request_cost_USD_sum{job=~\"$service\", gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[1m])) by (gen_ai_provider_name) * 60",
92
153
  "legendFormat": "{{ gen_ai_provider_name }}",
93
154
  "refId": "A"
94
155
  }
@@ -100,7 +161,9 @@
100
161
  "drawStyle": "bars",
101
162
  "fillOpacity": 50,
102
163
  "lineWidth": 1,
103
- "stacking": { "mode": "normal" }
164
+ "stacking": {
165
+ "mode": "normal"
166
+ }
104
167
  }
105
168
  },
106
169
  "overrides": []
@@ -109,11 +172,19 @@
109
172
  {
110
173
  "title": "Cost by Model",
111
174
  "type": "timeseries",
112
- "gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 },
113
- "datasource": { "type": "prometheus", "uid": "prometheus" },
175
+ "gridPos": {
176
+ "h": 8,
177
+ "w": 12,
178
+ "x": 12,
179
+ "y": 4
180
+ },
181
+ "datasource": {
182
+ "type": "prometheus",
183
+ "uid": "prometheus"
184
+ },
114
185
  "targets": [
115
186
  {
116
- "expr": "sum(rate(gen_ai_client_request_cost_USD_sum{gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[1m])) by (gen_ai_request_model) * 60",
187
+ "expr": "sum(rate(gen_ai_client_request_cost_USD_sum{job=~\"$service\", gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[1m])) by (gen_ai_request_model) * 60",
117
188
  "legendFormat": "{{ gen_ai_request_model }}",
118
189
  "refId": "A"
119
190
  }
@@ -125,7 +196,9 @@
125
196
  "drawStyle": "bars",
126
197
  "fillOpacity": 50,
127
198
  "lineWidth": 1,
128
- "stacking": { "mode": "normal" }
199
+ "stacking": {
200
+ "mode": "normal"
201
+ }
129
202
  }
130
203
  },
131
204
  "overrides": []
@@ -134,11 +207,19 @@
134
207
  {
135
208
  "title": "Cost per Request",
136
209
  "type": "timeseries",
137
- "gridPos": { "h": 8, "w": 12, "x": 0, "y": 12 },
138
- "datasource": { "type": "prometheus", "uid": "prometheus" },
210
+ "gridPos": {
211
+ "h": 8,
212
+ "w": 12,
213
+ "x": 0,
214
+ "y": 12
215
+ },
216
+ "datasource": {
217
+ "type": "prometheus",
218
+ "uid": "prometheus"
219
+ },
139
220
  "targets": [
140
221
  {
141
- "expr": "sum(rate(gen_ai_client_request_cost_USD_sum{gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[5m])) / sum(rate(gen_ai_client_request_cost_USD_count{gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[5m]))",
222
+ "expr": "sum(rate(gen_ai_client_request_cost_USD_sum{job=~\"$service\", gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[5m])) / sum(rate(gen_ai_client_request_cost_USD_count{job=~\"$service\", gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[5m]))",
142
223
  "legendFormat": "avg cost/request",
143
224
  "refId": "A"
144
225
  }
@@ -146,7 +227,11 @@
146
227
  "fieldConfig": {
147
228
  "defaults": {
148
229
  "unit": "currencyUSD",
149
- "custom": { "drawStyle": "line", "fillOpacity": 15, "lineWidth": 2 }
230
+ "custom": {
231
+ "drawStyle": "line",
232
+ "fillOpacity": 15,
233
+ "lineWidth": 2
234
+ }
150
235
  },
151
236
  "overrides": []
152
237
  }
@@ -154,11 +239,19 @@
154
239
  {
155
240
  "title": "Daily Cost Trend",
156
241
  "type": "timeseries",
157
- "gridPos": { "h": 8, "w": 12, "x": 12, "y": 12 },
158
- "datasource": { "type": "prometheus", "uid": "prometheus" },
242
+ "gridPos": {
243
+ "h": 8,
244
+ "w": 12,
245
+ "x": 12,
246
+ "y": 12
247
+ },
248
+ "datasource": {
249
+ "type": "prometheus",
250
+ "uid": "prometheus"
251
+ },
159
252
  "targets": [
160
253
  {
161
- "expr": "sum(increase(gen_ai_client_request_cost_USD_sum{gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[1h]))",
254
+ "expr": "sum(increase(gen_ai_client_request_cost_USD_sum{job=~\"$service\", gen_ai_provider_name=~\"$provider\", gen_ai_request_model=~\"$model\"}[1h]))",
162
255
  "legendFormat": "hourly cost",
163
256
  "refId": "A"
164
257
  }
@@ -166,7 +259,11 @@
166
259
  "fieldConfig": {
167
260
  "defaults": {
168
261
  "unit": "currencyUSD",
169
- "custom": { "drawStyle": "line", "fillOpacity": 15, "lineWidth": 2 }
262
+ "custom": {
263
+ "drawStyle": "line",
264
+ "fillOpacity": 15,
265
+ "lineWidth": 2
266
+ }
170
267
  },
171
268
  "overrides": []
172
269
  }
@@ -177,29 +274,60 @@
177
274
  "tags": ["llm", "observability", "toad-eye"],
178
275
  "templating": {
179
276
  "list": [
277
+ {
278
+ "name": "service",
279
+ "type": "query",
280
+ "datasource": {
281
+ "type": "prometheus",
282
+ "uid": "prometheus"
283
+ },
284
+ "query": "label_values(gen_ai_client_requests_total, job)",
285
+ "includeAll": true,
286
+ "allValue": ".*",
287
+ "current": {
288
+ "text": "All",
289
+ "value": "$__all"
290
+ },
291
+ "multi": true
292
+ },
180
293
  {
181
294
  "name": "provider",
182
295
  "type": "query",
183
- "datasource": { "type": "prometheus", "uid": "prometheus" },
296
+ "datasource": {
297
+ "type": "prometheus",
298
+ "uid": "prometheus"
299
+ },
184
300
  "query": "label_values(gen_ai_client_requests_total, gen_ai_provider_name)",
185
301
  "includeAll": true,
186
302
  "allValue": ".*",
187
- "current": { "text": "All", "value": "$__all" },
303
+ "current": {
304
+ "text": "All",
305
+ "value": "$__all"
306
+ },
188
307
  "multi": true
189
308
  },
190
309
  {
191
310
  "name": "model",
192
311
  "type": "query",
193
- "datasource": { "type": "prometheus", "uid": "prometheus" },
312
+ "datasource": {
313
+ "type": "prometheus",
314
+ "uid": "prometheus"
315
+ },
194
316
  "query": "label_values(gen_ai_client_requests_total{gen_ai_provider_name=~\"$provider\"}, gen_ai_request_model)",
195
317
  "includeAll": true,
196
318
  "allValue": ".*",
197
- "current": { "text": "All", "value": "$__all" },
319
+ "current": {
320
+ "text": "All",
321
+ "value": "$__all"
322
+ },
198
323
  "multi": true
199
324
  }
200
325
  ]
201
326
  },
202
- "time": { "from": "now-15m", "to": "now" },
327
+ "time": {
328
+ "from": "now-15m",
329
+ "to": "now"
330
+ },
203
331
  "timepicker": {},
204
332
  "timezone": "browser",
205
333
  "title": "toad-eye: Cost Breakdown",