fix(effect): Remove span op fallback to function - #24263
Open
Lms24 wants to merge 1 commit into
Open
Conversation
The tracer derives op and origin from the span name, which is the only signal Effect gives it. `@effect/platform` names its HTTP spans `http.server`/`http.client`, but every other name comes from user code or a third-party library calling `Effect.withSpan`. Those spans were labelled with op `function` and origin `auto.function.effect`, which invents semantics the SDK cannot know and claims the span was auto-instrumented when the user created it by hand. Leave op and origin unset for names we cannot map, so the span keeps the core defaults: no op, and a `manual` origin. More fine-grained ops can be mapped later where a name actually identifies the operation. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
size-limit report 📦
|
Lms24
marked this pull request as ready for review
September 9, 2026 17:50
Lms24
requested review from
JPeer264,
nicohrubec and
s1gr1d
and removed request for
a team
September 9, 2026 17:50
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.
Initially, in #24261, I just wanted to enhance
functionspans in Effect but then realized when looking at the test changes that we likely shouldn't set afunctionop on these spans at all. IIUC, our wrapper can either be called by users or by other libraries that emit spans. From these spans, we try to infer an op (http.clientandhttp.serverat the moment). However, falling back tofunctionfor all other spans doesn't sound right to me because these could be any kinds of span.Therefore, this PR
manualfor spans we don't knowMy thinking is: We likely need to improve the inference logic if we know that certain libraries' spans go through our wrapper. Thinking of db, queue, request, etc. spans. But
functionlikely isn't the fallback we want to use.The side-effect: Spans with
sentry.origin: "manual"double write span name and description, so no low card. span name stuff applies to them.Would appreciate a thourough Effect-ive review, because I might be off here
ref (somewhat) #23954