Tracing-only browser setup still bundles error-event code

Đang mở
#26,128 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, typescript
Lĩnh vực
devtools, performance

Hướng nghiên cứu

Start by tracing how BrowserClient and Client statically import eventFromException, eventFromMessage, and prepareEvent, then inspect the listed files and the tracing-only setup described in the issue. Check the existing streaming-mode work in #22580 for related transaction code paths. Done means error-event code can be excluded from a spans-only browser build while normal error capture continues to work; the issue does not specify tests.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Feature javascript Traces

A browser setup that sends only spans still bundles the client's error-event pipeline. The setup is BrowserClient with only browserTracingIntegration, no default integrations, and span streaming (the 11.x default).

  • In a minified esbuild build on 11.10.0, the Sentry SDK comes to 119.2 KB raw after removing the default integrations and debug code.
  • About 9.6 KB raw of that is error-event code. These files look unused when no error events are captured (inference, not traced at runtime):
    • browser/eventbuilder.js: 2,813 B
    • core/utils/prepareEvent.js: 2,451 B
    • core/utils/normalize.js: 1,461 B
    • browser/stack-parsers.js: 1,418 B
    • core/session.js: 881 B
    • core/utils/stacktrace.js: 840 B
  • BrowserClient and Client pull these in statically through eventFromException, eventFromMessage and prepareEvent. A tracing-only app has no way to drop them.
  • Related: #22580 covers the transaction code paths in streaming mode (utils/transactionEvent.js and envelope helpers, about 3 KB raw in the same build).

Seen in getsentry/junior's dashboard, which sends performance spans only and never error events, so that conversation content can't leak into events.

via @BYK.

--

View Session in Sentry

Ngôn ngữ chính
TypeScript
Star
8.8k
Fork
1.9k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
744

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/sentry-javascript

Tất cả issue của getsentry/sentry-javascript

Issue tương tự

Thêm issue về TypeScript

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.