feat(HttpClient): add span-customization hook
Los mantenedores suelen responder en 1 día
@ArjunCodess ya está trabajando en esto.
Desde el 19/9/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- api, observability
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 16.7k
- Forks
- 808
- Merge medio
- 10 h 33 min
- PR fusionados (30 d)
- 830
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Effect-TS/effect
-
RpcTest.makeClient: accept disableFatalDefectsPosiblemente ocupada @effect-bot la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Effect-TS/effect#9893 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
`HttpApiSchema.Upgrade`: allow a regular success for servers that don't upgradePosiblemente ocupada @effect-bot la tomó hoy. Abiertodocker-made-me-do-it enhancement
Effect-TS/effect#9912 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
docker-made-me-do-it enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
Los mantenedores suelen responder en 1 día
-
`HttpApiSchema`: stream bodies in a custom framingPosiblemente ocupada @effect-bot la tomó hoy. Abiertodocker-made-me-do-it enhancement
Effect-TS/effect#9910 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
`HttpApiSchema` streams: declare every media type a stream can be sent asPosiblemente ocupada @effect-bot la tomó hoy. Abiertodocker-made-me-do-it enhancement
Effect-TS/effect#9909 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Effect-TS/effect
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
microsoft/playwright#43640 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
grasshopper-protocol/grsshppr#172 ·
Los mantenedores suelen responder en 1 día
-
bug help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Tencent/teamai-cli#1397 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
DouyinFE/semi-design#3641 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día