-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add Gen AI user and session Semantic Conventions #1872
Comments
Yeah, I believe the common semantic conventions you mentioned are what we need. However, it seems that these attributes are not listed as the conditionally required/recommended items in GenAI spans. Considering that session plays a key role in GenAI, I think session.id should be conditionally required. "Enduser" may not be required in some scenarios where there is indeed no role for an end user, but I believe it is still a recommended attribute. |
Several added context here: We injected the |
we can document them, it's not possible to require them since GenAI related instrumentation on the backend service don't usually have this information. It's part of application/OTel distro to propagate user/session information and stamp it on all telemetry. We can definitely document this in GenAI conventions. |
Agree. And that's why I call them "conditionally required" (or "recommended").
Of course! If you plan to document this with a new PR, could you please cc me so that I can learn the necessary steps? We intend to add Alibaba vendor (also known as Dashscope) semantic conventions to reduce communication costs and standardize our conventions. Thank you very much! |
Area(s)
area:gen-ai
Propose new conventions
In the application scenario of large language models, C-end customers often have multiple rounds of conversations. It is necessary to record the C-end customers and sessions to which different requests belong, so as to conduct session-level analysis and analyze the long-term memory problem of the model in the session context. At the same time, the C-end customers and session dimensions can also be analyzed to count the activity and token consumption.
Describe the solution you'd like
gen_ai.user.id records the unique identity of the C-end user, and gen_ai.session.id records the session identifier.
These two identifiers will be transparently transmitted in the trace request, spanning multiple spans of the same trace.
@lmolkova @nirga @drewby @karthikscale3
The text was updated successfully, but these errors were encountered: