openllmetry icon indicating copy to clipboard operation
openllmetry copied to clipboard

Logging LLM provider request ids as `gen_ai` attributes

Open nirga opened this issue 1 year ago • 5 comments

Discussed in https://github.com/traceloop/openllmetry/discussions/2174

Originally posted by dinmukhamedm October 18, 2024 It would be very useful for debugging purposes (e.g. with OpenAI support) to have a unique identifier to an LLM call span. Has OpenLLMetry considered adding something like gen_ai.request.id attribute?

The biggest challenge I see with this is that they are not unified, and formatted differently across providers and even across endpoints of a single provider (e.g. completions vs assistant). Generally, there is a request-wide unique ID though, and if there is none, the attribute can obviously remain optional.

nirga avatar Nov 01 '24 09:11 nirga