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 @@ -257,6 +257,10 @@ function instrumentMethod<T extends unknown[], R>(
257
257
captureException ( error , {
258
258
mechanism : {
259
259
handled : false ,
260
+ type : 'openai.stream' ,
261
+ data : {
262
+ function : methodPath ,
263
+ } ,
260
264
} ,
261
265
} ) ;
262
266
span . end ( ) ;
@@ -282,7 +286,15 @@ function instrumentMethod<T extends unknown[], R>(
282
286
addResponseAttributes ( span , result , finalOptions . recordOutputs ) ;
283
287
return result ;
284
288
} catch ( error ) {
285
- captureException ( error ) ;
289
+ captureException ( error , {
290
+ mechanism : {
291
+ handled : false ,
292
+ type : 'openai' ,
293
+ data : {
294
+ function : methodPath ,
295
+ } ,
296
+ } ,
297
+ } ) ;
286
298
throw error ;
287
299
}
288
300
} ,
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