@@ -308,14 +308,14 @@ public void accept(Metadata metadata) {
308308 String key = tag .getKey ().substring (LLMOBS_TAG_PREFIX .length ());
309309 Object val = tag .getValue ();
310310 if (key .equals (INPUT ) || key .equals (OUTPUT )) {
311- writable .writeString (key , null );
312311 if (spanKind .equals (Tags .LLMOBS_LLM_SPAN_KIND )) {
313312 if (!(val instanceof List )) {
314313 LOGGER .warn (
315314 "unexpectedly found incorrect type for LLM span IO {}, expecting list" ,
316315 val .getClass ().getName ());
317316 continue ;
318317 }
318+ writable .writeString (key , null );
319319 writable .startMap (1 );
320320 // llm span kind must have llm objects
321321 List <LLMObs .LLMMessage > messages = (List <LLMObs .LLMMessage >) val ;
@@ -380,6 +380,7 @@ public void accept(Metadata metadata) {
380380 val .getClass ().getName ());
381381 continue ;
382382 }
383+ writable .writeString (key , null );
383384 writable .startMap (1 );
384385 List <LLMObs .Document > documents = (List <LLMObs .Document >) val ;
385386 writable .writeString ("documents" , null );
@@ -390,6 +391,7 @@ public void accept(Metadata metadata) {
390391 writable .writeString (document .getText (), null );
391392 }
392393 } else {
394+ writable .writeString (key , null );
393395 writable .startMap (1 );
394396 writable .writeString ("value" , null );
395397 writable .writeObject (val , null );
0 commit comments