Effect CommunityEC
Effect Community2mo ago
37 replies
Skosh

Confusion Between `Effect.fn`, `Effect.fnUntraced`, and `Effect.fn("SpanName")`

I'm super confused between the difference of Effect.fn(function*() {...}) vs Effect.fnUntraced(function*() {...}) and Effect.fn("SpanName")(function*() {...})

Playground here: https://effect.website/play#56749d8c9f5d

Using baz (fnUntraced) correctly shows logWarning, bar (just fn) kills the program, shows stacktrace on the parent span, but DOESNT EVEN LOG THE WARNING??

And foo (Effect.fn("SpanName")) works as expected.

This is quite weird. I expected Effect.fn(function*() {}) to work just the same as fnUntraced, except with automatic tracing span, but this playground shows that Effect.fn actually swallows logs?
Was this page helpful?