aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/Tracer.scala
blob: 3d824896a7d4fa16ec05d4c47b4e96566b659fe4 (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.unit

}