@@ -14,7 +14,7 @@ describe('OpenAI integration', () => {
14
14
data : {
15
15
'gen_ai.operation.name' : 'chat' ,
16
16
'sentry.op' : 'gen_ai.chat' ,
17
- 'sentry.origin' : 'manual ' ,
17
+ 'sentry.origin' : 'auto.ai.openai ' ,
18
18
'gen_ai.system' : 'openai' ,
19
19
'gen_ai.request.model' : 'gpt-3.5-turbo' ,
20
20
'gen_ai.request.temperature' : 0.7 ,
@@ -32,15 +32,15 @@ describe('OpenAI integration', () => {
32
32
} ,
33
33
description : 'chat gpt-3.5-turbo' ,
34
34
op : 'gen_ai.chat' ,
35
- origin : 'manual ' ,
35
+ origin : 'auto.ai.openai ' ,
36
36
status : 'ok' ,
37
37
} ) ,
38
38
// Second span - responses API
39
39
expect . objectContaining ( {
40
40
data : {
41
41
'gen_ai.operation.name' : 'responses' ,
42
42
'sentry.op' : 'gen_ai.responses' ,
43
- 'sentry.origin' : 'manual ' ,
43
+ 'sentry.origin' : 'auto.ai.openai ' ,
44
44
'gen_ai.system' : 'openai' ,
45
45
'gen_ai.request.model' : 'gpt-3.5-turbo' ,
46
46
'gen_ai.response.model' : 'gpt-3.5-turbo' ,
@@ -57,29 +57,29 @@ describe('OpenAI integration', () => {
57
57
} ,
58
58
description : 'responses gpt-3.5-turbo' ,
59
59
op : 'gen_ai.responses' ,
60
- origin : 'manual ' ,
60
+ origin : 'auto.ai.openai ' ,
61
61
status : 'ok' ,
62
62
} ) ,
63
63
// Third span - error handling
64
64
expect . objectContaining ( {
65
65
data : {
66
66
'gen_ai.operation.name' : 'chat' ,
67
67
'sentry.op' : 'gen_ai.chat' ,
68
- 'sentry.origin' : 'manual ' ,
68
+ 'sentry.origin' : 'auto.ai.openai ' ,
69
69
'gen_ai.system' : 'openai' ,
70
70
'gen_ai.request.model' : 'error-model' ,
71
71
} ,
72
72
description : 'chat error-model' ,
73
73
op : 'gen_ai.chat' ,
74
- origin : 'manual ' ,
74
+ origin : 'auto.ai.openai ' ,
75
75
status : 'unknown_error' ,
76
76
} ) ,
77
77
// Fourth span - chat completions streaming
78
78
expect . objectContaining ( {
79
79
data : {
80
80
'gen_ai.operation.name' : 'chat' ,
81
81
'sentry.op' : 'gen_ai.chat' ,
82
- 'sentry.origin' : 'manual ' ,
82
+ 'sentry.origin' : 'auto.ai.openai ' ,
83
83
'gen_ai.system' : 'openai' ,
84
84
'gen_ai.request.model' : 'gpt-4' ,
85
85
'gen_ai.request.temperature' : 0.8 ,
@@ -99,15 +99,15 @@ describe('OpenAI integration', () => {
99
99
} ,
100
100
description : 'chat gpt-4 stream-response' ,
101
101
op : 'gen_ai.chat' ,
102
- origin : 'manual ' ,
102
+ origin : 'auto.ai.openai ' ,
103
103
status : 'ok' ,
104
104
} ) ,
105
105
// Fifth span - responses API streaming
106
106
expect . objectContaining ( {
107
107
data : {
108
108
'gen_ai.operation.name' : 'responses' ,
109
109
'sentry.op' : 'gen_ai.responses' ,
110
- 'sentry.origin' : 'manual ' ,
110
+ 'sentry.origin' : 'auto.ai.openai ' ,
111
111
'gen_ai.system' : 'openai' ,
112
112
'gen_ai.request.model' : 'gpt-4' ,
113
113
'gen_ai.request.stream' : true ,
@@ -126,7 +126,7 @@ describe('OpenAI integration', () => {
126
126
} ,
127
127
description : 'responses gpt-4 stream-response' ,
128
128
op : 'gen_ai.responses' ,
129
- origin : 'manual ' ,
129
+ origin : 'auto.ai.openai ' ,
130
130
status : 'ok' ,
131
131
} ) ,
132
132
// Sixth span - error handling in streaming context
@@ -137,11 +137,11 @@ describe('OpenAI integration', () => {
137
137
'gen_ai.request.stream' : true ,
138
138
'gen_ai.system' : 'openai' ,
139
139
'sentry.op' : 'gen_ai.chat' ,
140
- 'sentry.origin' : 'manual ' ,
140
+ 'sentry.origin' : 'auto.ai.openai ' ,
141
141
} ,
142
142
description : 'chat error-model stream-response' ,
143
143
op : 'gen_ai.chat' ,
144
- origin : 'manual ' ,
144
+ origin : 'auto.ai.openai ' ,
145
145
status : 'internal_error' ,
146
146
} ) ,
147
147
] ) ,
@@ -155,7 +155,7 @@ describe('OpenAI integration', () => {
155
155
data : {
156
156
'gen_ai.operation.name' : 'chat' ,
157
157
'sentry.op' : 'gen_ai.chat' ,
158
- 'sentry.origin' : 'manual ' ,
158
+ 'sentry.origin' : 'auto.ai.openai ' ,
159
159
'gen_ai.system' : 'openai' ,
160
160
'gen_ai.request.model' : 'gpt-3.5-turbo' ,
161
161
'gen_ai.request.temperature' : 0.7 ,
@@ -176,15 +176,15 @@ describe('OpenAI integration', () => {
176
176
} ,
177
177
description : 'chat gpt-3.5-turbo' ,
178
178
op : 'gen_ai.chat' ,
179
- origin : 'manual ' ,
179
+ origin : 'auto.ai.openai ' ,
180
180
status : 'ok' ,
181
181
} ) ,
182
182
// Second span - responses API with PII
183
183
expect . objectContaining ( {
184
184
data : {
185
185
'gen_ai.operation.name' : 'responses' ,
186
186
'sentry.op' : 'gen_ai.responses' ,
187
- 'sentry.origin' : 'manual ' ,
187
+ 'sentry.origin' : 'auto.ai.openai ' ,
188
188
'gen_ai.system' : 'openai' ,
189
189
'gen_ai.request.model' : 'gpt-3.5-turbo' ,
190
190
'gen_ai.request.messages' : '"Translate this to French: Hello"' ,
@@ -203,30 +203,30 @@ describe('OpenAI integration', () => {
203
203
} ,
204
204
description : 'responses gpt-3.5-turbo' ,
205
205
op : 'gen_ai.responses' ,
206
- origin : 'manual ' ,
206
+ origin : 'auto.ai.openai ' ,
207
207
status : 'ok' ,
208
208
} ) ,
209
209
// Third span - error handling with PII
210
210
expect . objectContaining ( {
211
211
data : {
212
212
'gen_ai.operation.name' : 'chat' ,
213
213
'sentry.op' : 'gen_ai.chat' ,
214
- 'sentry.origin' : 'manual ' ,
214
+ 'sentry.origin' : 'auto.ai.openai ' ,
215
215
'gen_ai.system' : 'openai' ,
216
216
'gen_ai.request.model' : 'error-model' ,
217
217
'gen_ai.request.messages' : '[{"role":"user","content":"This will fail"}]' ,
218
218
} ,
219
219
description : 'chat error-model' ,
220
220
op : 'gen_ai.chat' ,
221
- origin : 'manual ' ,
221
+ origin : 'auto.ai.openai ' ,
222
222
status : 'unknown_error' ,
223
223
} ) ,
224
224
// Fourth span - chat completions streaming with PII
225
225
expect . objectContaining ( {
226
226
data : expect . objectContaining ( {
227
227
'gen_ai.operation.name' : 'chat' ,
228
228
'sentry.op' : 'gen_ai.chat' ,
229
- 'sentry.origin' : 'manual ' ,
229
+ 'sentry.origin' : 'auto.ai.openai ' ,
230
230
'gen_ai.system' : 'openai' ,
231
231
'gen_ai.request.model' : 'gpt-4' ,
232
232
'gen_ai.request.temperature' : 0.8 ,
@@ -249,15 +249,15 @@ describe('OpenAI integration', () => {
249
249
} ) ,
250
250
description : 'chat gpt-4 stream-response' ,
251
251
op : 'gen_ai.chat' ,
252
- origin : 'manual ' ,
252
+ origin : 'auto.ai.openai ' ,
253
253
status : 'ok' ,
254
254
} ) ,
255
255
// Fifth span - responses API streaming with PII
256
256
expect . objectContaining ( {
257
257
data : expect . objectContaining ( {
258
258
'gen_ai.operation.name' : 'responses' ,
259
259
'sentry.op' : 'gen_ai.responses' ,
260
- 'sentry.origin' : 'manual ' ,
260
+ 'sentry.origin' : 'auto.ai.openai ' ,
261
261
'gen_ai.system' : 'openai' ,
262
262
'gen_ai.request.model' : 'gpt-4' ,
263
263
'gen_ai.request.stream' : true ,
@@ -278,7 +278,7 @@ describe('OpenAI integration', () => {
278
278
} ) ,
279
279
description : 'responses gpt-4 stream-response' ,
280
280
op : 'gen_ai.responses' ,
281
- origin : 'manual ' ,
281
+ origin : 'auto.ai.openai ' ,
282
282
status : 'ok' ,
283
283
} ) ,
284
284
// Sixth span - error handling in streaming context with PII
@@ -290,11 +290,11 @@ describe('OpenAI integration', () => {
290
290
'gen_ai.request.messages' : '[{"role":"user","content":"This will fail"}]' ,
291
291
'gen_ai.system' : 'openai' ,
292
292
'sentry.op' : 'gen_ai.chat' ,
293
- 'sentry.origin' : 'manual ' ,
293
+ 'sentry.origin' : 'auto.ai.openai ' ,
294
294
} ,
295
295
description : 'chat error-model stream-response' ,
296
296
op : 'gen_ai.chat' ,
297
- origin : 'manual ' ,
297
+ origin : 'auto.ai.openai ' ,
298
298
status : 'internal_error' ,
299
299
} ) ,
300
300
] ) ,
0 commit comments