Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Port node-integration-tests to span streaming

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

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
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, typescript
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu trong dev-packages/node-integration-tests và so sánh các suite với tracing/httpIntegration-streamed. Xác định các pin static và STREAMED của traceLifecycle, sau đó kiểm tra các assertion transaction-envelope và việc thu thập child-span trong các suite bị ảnh hưởng. Hoàn tất khi package sử dụng span streaming xuyên suốt, các bản tương ứng streamed được gộp trở lại, các assertion bao phủ span v2, còn tracing/sampling-static và public-api/beforeSendSpan-static vẫn là phần coverage static.

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

Mô tả

javascript Task

Port dev-packages/node-integration-tests to span streaming. Span streaming is the default, so every suite that still pins traceLifecycle: 'static' covers behaviour we no longer ship.

Part of SDK-1425, one tracking issue per integration test package.

Scope

  • 299 traceLifecycle: 'static' pins across 188 suite directories
  • 111 suite directories assert on transaction envelopes and need a real rewrite
  • 19 suites already have a -streamed twin next to the static original
  • 20 suites use the env-gated traceLifecycle: process.env.STREAMED === 'true' ? 'stream' : 'static' pattern

How to port a suite

  1. Remove the traceLifecycle: 'static' pin from every Sentry.init in the suite.
  2. If a -streamed twin exists, fold it back: delete the static original and rename the twin to the base name. Do not keep both, or the coverage doubles and the two copies drift.
  3. If the suite uses the env-gated STREAMED switch, drop the switch and keep 'stream'.
  4. Rewrite the assertions from transaction envelopes to span v2:
    • .expect({ transaction }) becomes .expect({ span }), which gives a SerializedStreamedSpanContainer
    • event.transaction becomes span.name
    • contexts.trace.op becomes the sentry.op attribute plus span.is_segment
    • contexts.trace.data['x'] becomes span.attributes['x'], which has the shape { value, type }
    • transaction_info.source becomes the sentry.segment.name.source attribute
  5. Streamed child spans arrive across several envelopes, so collect across envelopes wherever a test asserts on children of a segment span.

Watch for span names that become low cardinality under streaming: http.server, http.client, db, cache, gen_ai and graphql. Those assertions change, not just the helper.

Reference suite: suites/tracing/httpIntegration-streamed.

Keep static trace lifecycle coverage

Do not add a -static copy per suite. tracing/sampling-static and public-api/beforeSendSpan-static already guard the static lifecycle for this package.

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

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

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

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.