feat(HttpClient): add span-customization hook
Maintainer thường phản hồi trong vòng 1 ngày
@ArjunCodess đang làm issue này rồi.
Từ ngày 19/9/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- api, observability
Hướng nghiên cứu
Start by locating the HttpClient tracing implementation and the existing span-name, whitelisted-header, and redacted-header customization points. Trace where the request, response, and client span are available, then clarify the hook's lifecycle and supported span changes; done means per-request customization covers the stated attributes, status, and kind requirements without replacing the client.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What is the problem this feature would solve?
The client span that HttpClient creates is almost entirely fixed. Today you can only customize the span name, whitelisted headers, and redacted headers.
So short of replacing the whole client, none of the following is possible per request:
- Add attributes to just the client span. Effect.annotateSpans reaches it, but it propagates to every span created in scope, so the attribute also lands on nested spans. Effect.annotateCurrentSpan only touches the current span, but the client span is created inside the client call and is never the current span at your call site, so it can't reach it either.
- Add http.route or another low-cardinality template attribute.
- Override or redact url.full / url.query / url.path. Query strings and path segments are captured verbatim.
- Set span status for non-2xx. HttpClient returns 4xx/5xx as a successful response, so the span carries a status_code attribute but no error status.
- Change the span kind, for example a producer-style fire-and-forget.
What is the feature you are proposing to solve the problem?
A span-customization hook on HttpClient that receives the span along with the request (and the response when available) and can do anything to the span: set or overwrite any attribute (including the built-in url.* ones), add peer.service / http.route / arbitrary attributes, set span status, and set the span kind.
In addition to the hook, maybe we should also provide URL query redaction control, symmetric with CurrentRedactedNames for headers.
What alternatives have you considered?
- Disable HttpClient's built-in tracing and instrument the calls by hand.
- Collector-side processors. But it's out of process and the sensitive data leaves your app, so you're relying on the collector to prune it before it's stored or forwarded.
- Ngôn ngữ chính
- TypeScript
- Star
- 16.7k
- Fork
- 808
- Merge trung bình
- 11 giờ 11 phút
- Pull request đã merge (30 ngày)
- 840
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Effect-TS/effect
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
@effect/ai-anthropic: text_editor_20250728 insert decodes `new_str`, but the API sends `insert_text`Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[email protected]: crypto/KeyFormat declarations require the global JsonWebKey, breaking Node-only type-checksCó thể đã có người làm @effect-bot đã nhận hôm nay. Đang mở
Effect-TS/effect#10115 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sql-pg: send several statements in one extended-query Sync (transaction-local context without extra round trips)Có thể đã có người làm @effect-bot đã nhận hôm nay. Đang mở
Effect-TS/effect#10113 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Effect-TS/effect
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
better-auth/better-auth#12132 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
hurttlocker/o8#5112 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
webrecorder/wabac.js#386 ·
-
needs-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
agent-of-empires/agent-of-empires#5098 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày