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

Non-scalar span attribute makes the server reject the whole event batch

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

Hướng nghiên cứu

Start with SpanContextManager.set_attributes() in wildedge/client.py:223 and the span constructor, then run the provided reproduction to confirm the 422 and dropped batch. Decide how non-scalar values should be handled, including whether to warn or coerce them, and update the relevant tests if present. Done means a non-scalar attribute no longer causes unrelated events in the batch to be rejected.

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

Mô tả

What happens

SpanContextManager.set_attributes() (wildedge/client.py:223) accepts any value. If one value is a list, e.g. span.set_attributes(rejections=["English", "too long"]), ingest answers 422 (span attributes['rejections'] must be a scalar) and every event in that batch is dropped: model loads, inferences and spans that had nothing to do with the bad attribute.

Found while integrating a llama.cpp + Whisper app; a whole run's telemetry disappeared because of one attribute.

Expected

One bad value should never cost unrelated events. Options, roughly in order of preference:

  1. Validate in set_attributes() / span constructor: drop (or str()) non-scalar values and log a warning once.
  2. Coerce lists of scalars to a joined string (plus a <key>_count?) — that's what we did app-side as a workaround.
  3. On a 422 that names a field, retry the batch without the offending event instead of dropping all of it.

Repro

client = wildedge.init()
with client.trace(run_id="r"):
    with client.span(kind="custom", name="s") as span:
        span.set_attributes(tags=["a", "b"])
client.close(timeout=5)  # batch rejected with 422, nothing ingested

SDK 0.2.2.

🤖 Generated with Claude Code

Ngôn ngữ chính
Python
Star
17
Fork
1
Merge trung bình
23 phút
Pull request đã merge (30 ngày)
7

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 wild-edge/wildedge-python

Tất cả issue của wild-edge/wildedge-python

Issue tương tự

Thêm issue về Python

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.