@@ -73,20 +73,24 @@ function testScenario(opentelemetryTracer: Tracer) {
7373}
7474
7575describe ( "flow decorator" , ( ) => {
76- it ( "should not create a trace without a flow" , async ( ) => {
77- const [ tracer , exporter ] = openTelemetryTestConfiguration ( ) ;
76+ it (
77+ "should not create a trace without a flow" ,
78+ async ( ) => {
79+ const [ tracer , exporter ] = openTelemetryTestConfiguration ( ) ;
7880
79- const callLLM = testScenario ( tracer ) [ 1 ] ;
81+ const callLLM = testScenario ( tracer ) [ 1 ] ;
8082
81- await callLLM ( callLLMMessages ( ) ) ;
83+ await callLLM ( callLLMMessages ( ) ) ;
8284
83- const spans = exporter . getFinishedSpans ( ) ;
85+ const spans = exporter . getFinishedSpans ( ) ;
8486
85- expect ( spans . length ) . toBe ( 3 ) ;
86- expect ( isLLMProviderCall ( spans [ 0 ] ) ) . toBe ( true ) ;
87- expect ( spans [ 1 ] . attributes [ "humanloop.file_type" ] ) . toBe ( "tool" ) ;
88- expect ( spans [ 2 ] . attributes [ "humanloop.file_type" ] ) . toBe ( "prompt" ) ;
89- } ) ;
87+ expect ( spans . length ) . toBe ( 3 ) ;
88+ expect ( isLLMProviderCall ( spans [ 0 ] ) ) . toBe ( true ) ;
89+ expect ( spans [ 1 ] . attributes [ "humanloop.file_type" ] ) . toBe ( "tool" ) ;
90+ expect ( spans [ 2 ] . attributes [ "humanloop.file_type" ] ) . toBe ( "prompt" ) ;
91+ } ,
92+ 10 * 1000 ,
93+ ) ;
9094
9195 it ( "should create a flow log" , async ( ) => {
9296 const [ tracer , exporter ] = openTelemetryTestConfiguration ( ) ;
0 commit comments