Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging LLM provider request ids as gen_ai attributes #2236

Open
nirga opened this issue Nov 1, 2024 Discussed in #2174 · 1 comment
Open

Logging LLM provider request ids as gen_ai attributes #2236

nirga opened this issue Nov 1, 2024 Discussed in #2174 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nirga
Copy link
Member

nirga commented Nov 1, 2024

Discussed in #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.

@dosubot dosubot bot added the enhancement New feature or request label Nov 1, 2024
@nirga nirga added the good first issue Good for newcomers label Nov 9, 2024
@dinmukhamedm
Copy link
Contributor

@nirga for this, we'll need to first uncomment https://github.com/traceloop/openllmetry/blob/main/packages/opentelemetry-semantic-conventions-ai/opentelemetry/semconv_ai/__init__.py#L53 and release a new version of opentelemetry.semconv_ai. Could you please do that? I am happy to try and add this to some of the providers/endpoints afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants