Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Provide NIO Futures TracingSupport extensions package (not sure how to call the module yet) #125

Open
ktoso opened this issue Aug 15, 2020 · 1 comment
Labels
i:nio Relates to swift-nio integration

Comments

@ktoso
Copy link
Collaborator

ktoso commented Aug 15, 2020

It's quite common to want to quickly wrap some code in a span for debugging, like:

let work = tracer.withSpan(name: "collecting work") { 
  // collect work
  // do things here
  return work
}

we should likely offer this build in suggar right away, and then the same would be useful for NIO futures...

let work = tracer.withEventLoopFutureSpan(name: "collecting work", context: context) { 
  return  makeSomeCall()
    .map()
    .map()
    .map() 
}

There's a number of alternative API shapes this could take... promise.traced(context) etc as well...

Let's see which APIs we should provide in an NIO "tracing helpers" package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i:nio Relates to swift-nio integration
Projects
None yet
Development

No branches or pull requests

2 participants