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 @@ -258,6 +258,10 @@ function instrumentMethod<T extends unknown[], R>(
258258 captureException ( error , {
259259 mechanism : {
260260 handled : false ,
261+ type : 'openai.stream' ,
262+ data : {
263+ function : methodPath ,
264+ } ,
261265 } ,
262266 } ) ;
263267 span . end ( ) ;
@@ -283,7 +287,15 @@ function instrumentMethod<T extends unknown[], R>(
283287 addResponseAttributes ( span , result , finalOptions . recordOutputs ) ;
284288 return result ;
285289 } catch ( error ) {
286- captureException ( error ) ;
290+ captureException ( error , {
291+ mechanism : {
292+ handled : false ,
293+ type : 'openai' ,
294+ data : {
295+ function : methodPath ,
296+ } ,
297+ } ,
298+ } ) ;
287299 throw error ;
288300 }
289301 } ,
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ function processResponsesApiEvent(
152152 captureException ( streamEvent , {
153153 mechanism : {
154154 handled : false ,
155+ type : 'openai.stream-response' ,
155156 } ,
156157 } ) ;
157158 return ;
You can’t perform that action at this time.
0 commit comments