File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
packages/core/src/utils/openai Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,10 @@ function instrumentMethod<T extends unknown[], R>(
256
256
captureException ( error , {
257
257
mechanism : {
258
258
handled : false ,
259
+ type : 'openai.stream' ,
260
+ data : {
261
+ function : methodPath ,
262
+ } ,
259
263
} ,
260
264
} ) ;
261
265
span . end ( ) ;
@@ -281,7 +285,15 @@ function instrumentMethod<T extends unknown[], R>(
281
285
addResponseAttributes ( span , result , finalOptions . recordOutputs ) ;
282
286
return result ;
283
287
} catch ( error ) {
284
- captureException ( error ) ;
288
+ captureException ( error , {
289
+ mechanism : {
290
+ handled : false ,
291
+ type : 'openai' ,
292
+ data : {
293
+ function : methodPath ,
294
+ } ,
295
+ } ,
296
+ } ) ;
285
297
throw error ;
286
298
}
287
299
} ,
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ function processResponsesApiEvent(
152
152
captureException ( streamEvent , {
153
153
mechanism : {
154
154
handled : false ,
155
+ type : 'openai.stream-response' ,
155
156
} ,
156
157
} ) ;
157
158
return ;
You can’t perform that action at this time.
0 commit comments