-
Notifications
You must be signed in to change notification settings - Fork 100
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
base: master
Are you sure you want to change the base?
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
#[metastructure(field = "gen_ai.response.text", pii = "maybe")] | ||
#[metastructure( | ||
field = "gen_ai.response.text", | ||
legacy_alias = "ai.responses", |
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.
This field also already exists ai_responses
"gen_ai.agent.name": "Seer", | ||
"gen_ai.system": "openai" | ||
"gen_ai.system": "openai", | ||
"gen_ai.agent.name": "Seer" |
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.
Can you revert this? They were alphabetical before.
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