Repository navigation
fix(effect): Detect HTTP spans named after the request method - #25159
Merged
Merged
Conversation
Effect 4.0.2 names its HTTP server and client spans after the request method only (`GET`) instead of `http.server GET` and `http.client GET`. The tracer derived the `http.server`/`http.client` op and the `auto.http.effect` origin from the name prefix, so these spans lost both. The tracer now also maps a span whose name is an HTTP method and whose kind is `server` or `client`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JPeer264
marked this pull request as ready for review
October 8, 2026 08:15
JPeer264
requested review from
chargome,
mydea and
nicohrubec
and removed request for
a team and
mydea
October 8, 2026 08:16
nicohrubec
approved these changes
Oct 8, 2026
chargome
approved these changes
Oct 8, 2026
JPeer264
added a commit
that referenced
this pull request
Oct 8, 2026
…5169) Backport of: #25159 ## Differences to the original PR - `packages/effect/src/tracer.ts`: v10 sets no span op, only the origin. The method and kind check goes into `deriveOrigin`, so on v10 the fix brings back the `auto.http.effect` origin but adds no `http.server` / `http.client` op. - `packages/effect/test/tracer.test.ts`: the 3 new cases use the v10 test style. The case for a `GET` span with no kind expects `auto.function.effect`, the v10 default origin, instead of no origin and no op. - E2E: v10 has no `effect-4-node/tests/spans.test.ts`. The span name change from `http.server GET` to `GET` goes into `transactions.test.ts`.
47 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This brings back the
http.server/http.clientop and theauto.http.effectorigin on Effect HTTP spans witheffect@4.0.2and later. The tracer now also maps a span whose name is an HTTP method and whose kind isserverorclient.Why
Effect-TS/effect#8873, released in
effect@4.0.2, names HTTP spans after the request method only (GETinstead ofhttp.server GET). The tracer derived the op and origin from that name prefix, so the spans lost both, and theeffect-4-nodeE2E tests failed ondevelop.Span name decisions
The tracer keeps the name that Effect sets (
GET). With thehttp.serverop, Sentry shows the segment asGET /test-transaction. We could rename it back tohttp.server GET, but Effect chose the OpenTelemetry naming on purpose.Known issues
serverorclientkind also gets the HTTP op.Sentry traces
Before (
develop,effect@4.0.2, ophttp, originmanual): https://sentry-sdks.sentry.io/explore/traces/trace/55137135a9a648f79a53d3a08f4d0546/After (this PR,
effect@4.0.2, ophttp.server, originauto.http.effect): https://sentry-sdks.sentry.io/explore/traces/trace/11a9e7bfb1834bfbbdb9c4ddedd3dd76/