-
Notifications
You must be signed in to change notification settings - Fork 101
Rename legacy ai.*
attributes to gen_ai.*
names.
#4924
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
Conversation
@@ -493,7 +493,7 @@ pub struct SpanData { | |||
pub gen_ai_usage_output_tokens_reasoning: Annotated<Value>, | |||
|
|||
// Exact model used to generate the response (e.g. gpt-4o-mini-2024-07-18) | |||
#[metastructure(field = "gen_ai.response.model")] | |||
#[metastructure(field = "gen_ai.response.model", legacy_alias = "ai.model_id")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also remove ai_model_id
field, since this is basically deprecating it. Not sure if it needs to be done as a part of this PR, or if follow-up is fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. I also fixed it so now ai.model_id
is an correct alias to gen_ai.request.model
. (and not response model)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also have deleted the ai_model_id
field. This does not cause any problems if an SDK sends an ai.model_id
right? (so relay will just save it as gen_ai_request_model
and omit saving it in ai_model_id
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, but you will still need an approve from code owner (ingest team)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You already got the @vgrozdanic stamp of approval
This makes the names OTel compatible and also allows older SDKs that use the legacy names to send spans that will appear in the AI agents insights module.
Those are matching the deprecated
ai.*
attributes described in the Sentry conventions:https://getsentry.github.io/sentry-conventions/generated/attributes/ai.html#deprecated-attributes
We have checked if those attributes are used by customers in alerts, dashboards and saved queries. They are NOT used, so we can safely normalize them.
Fixes getsentry/sentry-python#4516