Skip to content

fix(core): Truncate content array format in Vercel #19919

@github-actions

Description

@github-actions

Note

The pull request "fix(core): Truncate content array format in Vercel" was created by @nicohrubec but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.

Add truncation for content array messages i.e. messages that have a content key, where content is an array of objects e.g. {"type": "text", "text": "some string"}. Previously these were returned as is bypassing the truncation logic. This PR makes sure these messages get truncated as well.

We already handled parts array messages, which have essentially the same format but use a parts key. So I basically just generalized the truncatePartsMessage to also handle the content array format.

Note: After switching to the Span V2 protocol we will get rid of truncation in the SDK altogether, but for now we should make sure to properly truncate.

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions