Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

**Features**:

- Transform deprecated `gen_ai.request.messages`, `gen_ai.response.text`, and `gen_ai.response.tool_calls` attributes into their normalized replacements (`gen_ai.input.messages` and `gen_ai.output.messages`). ([#6201](https://github.com/getsentry/relay/pull/6201))

## 26.7.0

**Features**:
Expand Down
7 changes: 7 additions & 0 deletions relay-conventions/build/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ pub enum DeprecationStatus {
Backfill,
/// Only write the replacement name.
Normalize,
/// Move the value to the replacement name and apply a value transformation.
///
/// For write behavior purposes, this produces `CurrentName` — the generic attribute
/// renaming logic leaves these attributes alone. Dedicated transformation code handles
/// the full move-and-reshape.
Transform,
}

/// Information about an attribute's deprecation.
Expand Down Expand Up @@ -126,6 +132,7 @@ fn format_write_behavior(deprecation: Option<&Deprecation>) -> String {
DeprecationStatus::Normalize => {
format!("WriteBehavior::NewName({name})")
}
DeprecationStatus::Transform => "WriteBehavior::CurrentName".to_owned(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion relay-conventions/sentry-conventions

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary anymore, master has a more up to date version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentry-conventions PR contains the transformations. We should point to that version, once its merged.

1 change: 1 addition & 0 deletions relay-event-normalization/src/eap/ai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub fn normalize_ai(
return;
}

crate::eap::gen_ai_transform::transform_gen_ai(attributes);
normalize_model(attributes);
normalize_ai_type(attributes);
normalize_total_tokens(attributes);
Comment thread
sentry[bot] marked this conversation as resolved.
Expand Down
Loading