Skip to content

Commit fbd336f

Browse files
committed
fix(instrumentation-openai): capture conversation id when streaming
1 parent 0c20c09 commit fbd336f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/instrumentation-openai/src/instrumentation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
10401040
span.setAttributes({
10411041
[ATTR_GEN_AI_RESPONSE_ID]: response.id,
10421042
[ATTR_GEN_AI_RESPONSE_MODEL]: model,
1043+
[ATTR_GEN_AI_CONVERSATION_ID]: response.conversation?.id
10431044
});
10441045
break;
10451046
}

0 commit comments

Comments
 (0)