fix(server): Allow multipart requests without trailing newline - #465
Merged
Conversation
untitaker
approved these changes
Feb 11, 2020
constantinius
added a commit
that referenced
this pull request
Jul 16, 2026
Implement the two attribute transformations from sentry-conventions PR #465: `gen_ai_request_messages_to_input_messages` and `gen_ai_response_to_output_messages`. These reshape attribute values beyond simple key renaming. `gen_ai.request.messages` with `content` fields is converted to `gen_ai.input.messages` with `parts` arrays. `gen_ai.response.text` (plain string, JSON string array, or objects with content) and `gen_ai.response.tool_calls` are combined into a single `gen_ai.output.messages` assistant message with typed parts. The transformation is generic over `AttributesLike` so it works on both `Attributes` (SpanV2) and `SpanData` (SpanV1) without duplication. It runs inside both `normalize_ai` (EAP pipeline) and `enrich_ai_span_data` (transaction/legacy pipeline). Attributes with the new `"transform"` deprecation status produce `WriteBehavior::CurrentName` so `normalize_attribute_names` leaves them alone — the dedicated transformation code handles the full move-and-reshape. Deprecated keys are always cleaned up, even when the canonical key already exists or the value cannot be parsed. Contributes to TET-2587
constantinius
added a commit
that referenced
this pull request
Jul 16, 2026
Implement the two attribute transformations from sentry-conventions PR #465: `gen_ai_request_messages_to_input_messages` and `gen_ai_response_to_output_messages`. These reshape attribute values beyond simple key renaming. `gen_ai.request.messages` with `content` fields is converted to `gen_ai.input.messages` with `parts` arrays. `gen_ai.response.text` (plain string, JSON string array, or objects with content) and `gen_ai.response.tool_calls` are combined into a single `gen_ai.output.messages` assistant message with typed parts. The transformation is generic over `AttributesLike` so it works on both `Attributes` (SpanV2) and `SpanData` (SpanV1) without duplication. It runs inside both `normalize_ai` (EAP pipeline) and `enrich_ai_span_data` (transaction/legacy pipeline). Attributes with the new `"transform"` deprecation status produce `WriteBehavior::CurrentName` so `normalize_attribute_names` leaves them alone — the dedicated transformation code handles the full move-and-reshape. Deprecated keys are always cleaned up, even when the canonical key already exists or the value cannot be parsed. Contributes to TET-2587
constantinius
added a commit
that referenced
this pull request
Aug 3, 2026
The previous ref was a local cherry-pick that doesn't exist on the remote. Use the actual merged commit on origin/main instead.
constantinius
added a commit
that referenced
this pull request
Aug 3, 2026
The previous ref was a local cherry-pick that doesn't exist on the remote. Use the actual merged commit on origin/main instead.
constantinius
added a commit
that referenced
this pull request
Aug 3, 2026
Bump the sentry-conventions submodule to include PR #465 which adds the "transform" deprecation status for gen_ai attributes. Also adds the Transform variant to DeprecationStatus in the build script (producing WriteBehavior::CurrentName) and updates deprecated constant usages for the app vitals attributes that were renamed in the same range.
constantinius
added a commit
that referenced
this pull request
Aug 3, 2026
Bump the sentry-conventions submodule to include PR #465 which adds the "transform" deprecation status for gen_ai attributes. Also adds the Transform variant to DeprecationStatus in the build script (producing WriteBehavior::CurrentName) and updates deprecated constant usages for the app vitals attributes that were renamed in the same range.
constantinius
added a commit
that referenced
this pull request
Aug 3, 2026
Bump the sentry-conventions submodule to include PR #465 which adds the "transform" deprecation status for gen_ai attributes. Also adds the Transform variant to DeprecationStatus in the build script (producing WriteBehavior::CurrentName) and updates deprecated constant usages for the app vitals attributes that were renamed in the same range.
constantinius
added a commit
that referenced
this pull request
Aug 3, 2026
Bump the sentry-conventions submodule to include PR #465 which adds the "transform" deprecation status for gen_ai attributes. Also adds the Transform variant to DeprecationStatus in the build script (producing WriteBehavior::CurrentName) and updates deprecated constant usages for the app vitals attributes that were renamed in the same range.
constantinius
added a commit
that referenced
this pull request
Aug 4, 2026
Implement the two attribute transformations from sentry-conventions PR #465: `gen_ai_request_messages_to_input_messages` and `gen_ai_response_to_output_messages`. These reshape attribute values beyond simple key renaming. `gen_ai.request.messages` with `content` fields is converted to `gen_ai.input.messages` with `parts` arrays. `gen_ai.response.text` (plain string, JSON string array, or objects with content) and `gen_ai.response.tool_calls` are combined into a single `gen_ai.output.messages` assistant message with typed parts. The transformation is generic over `AttributesLike` so it works on both `Attributes` (SpanV2) and `SpanData` (SpanV1) without duplication. It runs inside both `normalize_ai` (EAP pipeline) and `enrich_ai_span_data` (transaction/legacy pipeline). Attributes with the new `"transform"` deprecation status produce `WriteBehavior::CurrentName` so `normalize_attribute_names` leaves them alone — the dedicated transformation code handles the full move-and-reshape. Deprecated keys are always cleaned up, even when the canonical key already exists or the value cannot be parsed. Contributes to TET-2587
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes multipart uploads without a trailing newline.
\r\nat the end