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>(
257257 captureException ( error , {
258258 mechanism : {
259259 handled : false ,
260+ type : 'openai.stream' ,
261+ data : {
262+ function : methodPath ,
263+ } ,
260264 } ,
261265 } ) ;
262266 span . end ( ) ;
@@ -282,7 +286,15 @@ function instrumentMethod<T extends unknown[], R>(
282286 addResponseAttributes ( span , result , finalOptions . recordOutputs ) ;
283287 return result ;
284288 } catch ( error ) {
285- captureException ( error ) ;
289+ captureException ( error , {
290+ mechanism : {
291+ handled : false ,
292+ type : 'openai' ,
293+ data : {
294+ function : methodPath ,
295+ } ,
296+ } ,
297+ } ) ;
286298 throw error ;
287299 }
288300 } ,
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