aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/Tracer.scala
blob: 3eddc1d37d4e310f921cf9c62eda39e1c8f0e2c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package xyz.driver.tracing

import scala.concurrent.Future

/** Interface to tracing aggregation backends. */
trait Tracer {

  /** Submit a span to be sent to the aggregation backend.
    *
    * Note that submission typically happens asynchronously. Exact semantics are
    * implementation-specific, however to guarantee of successful submission is
    * made when this method returns. */
  def submit(span: Span): Unit

  /** Aggregate any potentially queued submissions and perform any cleanup logic. */
  def close(): Future[_] = Future.successful(())

}