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

span view / trace view drop span details: trace-items schema mismatch

Đang mở Phù hợp với người mới
#1,650 0 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu bằng cách xác định trình phân tích cú pháp phản hồi trace-items và schema thuộc tính được mô tả trong issue, sau đó so sánh nó với phản hồi từ lệnh sentry api được cung cấp. Tái hiện bằng sentry span view hoặc sentry trace view --json; hoàn tất khi các thuộc tính số nguyên được trả về dưới dạng chuỗi không còn làm mất chi tiết của span, bao gồm các thuộc tính và event được nhúng.

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

Mô tả

Environment

sentry CLI 0.45.0 (Homebrew, macOS 27). Org on the de.sentry.io region, iOS project on sentry-cocoa 9.29.2. Same behaviour on 0.44.1.

Steps to Reproduce
  1. sentry span view <trace-id> <segment-span-id> (or sentry trace view <trace-id> --json) on a trace with a transaction.

For comparison: sentry api "projects/<org>/<project>/trace-items/<span>/?item_type=spans&trace_id=<trace>&statsPeriod=14d".

Expected Result

Step 1 shows the span's attributes and, for the segment span, the embedded transaction event (breadcrumbs, contexts, extra), the same data the web trace view shows for that span.

Actual Result

Step 1 logs [api.traces] WARN Could not fetch details for span <id> for every span and drops the item; with --json the spans carry no attributes and no event. Calling through the sentry api returns the full item (61 attributes plus event).

The cause seems to be in the CLI. The following is an AI analysis of the bundle code:

 `R7()` requests `/projects/${org}/${project}/trace-items/${id}/` with `{trace_id, item_type}` and parses the response with `fq={itemId,timestamp,attributes:array(V_e)}`, where `V_e` is a discriminated union on `type`: `{type:"str",value:string}`, `{type:"int",value:number}`, `{type:"float",value:number}`, `{type:"bool",value:boolean}`, `{type:"array",value:array}`.

The API returns int attributes as strings, so the schema throws, and the code then catches every throw and logs a generic warning.

Attributes typed int with string values in the response for one segment span:

name type value
mobile.frozen_frames int "0"
mobile.slow_frames int "10"
mobile.total_frames int "232"
project_id int "4510969405374544"
tags[thread.id,number] int "259"

Related: #1564 (typed custom attributes break log list/view --fields, the same class of mismatch).

Ngôn ngữ chính
TypeScript
Star
123
Fork
14
Merge trung bình
1 ngày 48 phút
Pull request đã merge (30 ngày)
76

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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/cli

Tất cả issue của getsentry/cli

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.