import com.twitter.finagle.tracing.opencensus.TracingOps._
import io.opencensus.trace._
// run with this Span in the current context and ends// it when the returned Future is satisfiedval span: Span = ???
span.scopedToFuture {
// code that returns a com.twitter.util.Future
}
// run with this Span in the current context and ends// it when the block of code completesval span: Span = ???
span.scopedAndEnd {
// code
}
// run the given code in a newly scoped Spanval spanBuilder: SpanBuilder = ???
spanBuilder.runInScope {
// code
}
Scala syntax extensions for OpenCensus tracing.