Trouble with Tracing Spans in `runPromise` with Effect-TS
Hi all, effect-ts beginner here - trying to wrap the execute fn of tools that vercel ai-sdk is calling. This means I'm working w promises. I'm having trouble getting tracing to work (end goal is to get the tool calls in as spans). Is there something about
runPromise
runPromise
that makes it so that spans cannot be collected? Along the lines below. Thanks!
// This hi span is collectedyield* Effect.succeed('hi').pipe(Effect.withSpan('hi'));// the hi-in-promise span is not collectedyield* Effect.promise(() => { return Effect.runPromise(Effect.succeed('hi').pipe(Effect.withSpan('hi-in-promise')));});
// This hi span is collectedyield* Effect.succeed('hi').pipe(Effect.withSpan('hi'));// the hi-in-promise span is not collectedyield* Effect.promise(() => { return Effect.runPromise(Effect.succeed('hi').pipe(Effect.withSpan('hi-in-promise')));});