getsentry / getsentry/sentry-javascript

Re-evaluate `safeJoin` usage and align console integration behaviour across SDKs

Đang mở
#16,664 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Task
Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
1.8k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
515

Mô tả

### Description

In #16657 we got some user feedback that our `consoleLoggingIntegration` was sending logs with `[Object Object]` and `[Array]`. This was because of how we serialize with the `safeJoin` utility, since it uses `String(value)`.

https://github.com/getsentry/sentry-javascript/blob/b94f65279c8341a7176fe68186feef58af57e2cb/packages/core/src/utils/string.ts#L68-L94

https://github.com/getsentry/sentry-javascript/blob/b94f65279c8341a7176fe68186feef58af57e2cb/packages/core/src/utils/string.ts#L86

This was fixed in https://github.com/getsentry/sentry-javascript/pull/16658 by removing the usage of the `safeJoin` utility.

We should re-evaluate `safeJoin` usage across the SDKs and see if we want to replace it with `JSON.stringify(normalize)` instead.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.