Tracing

trait Tracing

Exposes the Tracing APIs using a built-in, globally shared tracer.

class Object
trait Matchable
class Any
object Kamon.type

Value members

Concrete methods

def clientSpanBuilder(operationName: String, component: String): SpanBuilder

Creates a new SpanBuilder for a Client Span and applies the provided component name as a metric tag. It is recommended that all Spans include a "component" metric tag that indicates what library or library section is generating the Span.

Creates a new SpanBuilder for a Client Span and applies the provided component name as a metric tag. It is recommended that all Spans include a "component" metric tag that indicates what library or library section is generating the Span.

def consumerSpanBuilder(operationName: String, component: String): SpanBuilder

Creates a new SpanBuilder for a Consumer Span and applies the provided component name as a metric tag. It is recommended that all Spans include a "component" metric tag that indicates what library or library section is generating the Span.

Creates a new SpanBuilder for a Consumer Span and applies the provided component name as a metric tag. It is recommended that all Spans include a "component" metric tag that indicates what library or library section is generating the Span.

Returns the Identifier Scheme currently used by the tracer.

Returns the Identifier Scheme currently used by the tracer.

def internalSpanBuilder(operationName: String, component: String): SpanBuilder

Creates a new SpanBuilder for an Internal Span and applies the provided component name as a metric tag. It is recommended that all Spans include a "component" metric tag that indicates what library or library section is generating the Span.

Creates a new SpanBuilder for an Internal Span and applies the provided component name as a metric tag. It is recommended that all Spans include a "component" metric tag that indicates what library or library section is generating the Span.

def producerSpanBuilder(operationName: String, component: String): SpanBuilder

Creates a new SpanBuilder for a Producer Span and applies the provided component name as a metric tag. It is recommended that all Spans include a "component" metric tag that indicates what library or library section is generating the Span.

Creates a new SpanBuilder for a Producer Span and applies the provided component name as a metric tag. It is recommended that all Spans include a "component" metric tag that indicates what library or library section is generating the Span.

def serverSpanBuilder(operationName: String, component: String): SpanBuilder

Creates a new SpanBuilder for a Server Span and applies the provided component name as a metric tag. It is recommended that all Spans include a "component" metric tag that indicates what library or library section is generating the Span.

Creates a new SpanBuilder for a Server Span and applies the provided component name as a metric tag. It is recommended that all Spans include a "component" metric tag that indicates what library or library section is generating the Span.

def span[A](operationName: String)(f: => A): A

Creates an Internal Span that finishes automatically when the provided function finishes execution. If the provided function returns a scala.concurrent.Future or java.util.concurrent.CompletionStage implementation then the Span will be finished with the Future/CompletionState completes.

Creates an Internal Span that finishes automatically when the provided function finishes execution. If the provided function returns a scala.concurrent.Future or java.util.concurrent.CompletionStage implementation then the Span will be finished with the Future/CompletionState completes.

You can get access to the created Span within the provided function using Kamon.currentSpan. For example, if you wanted to add a tag to a Span created with this function you could do it as follows:

span("fetchUserDetails") { Kamon.currentSpan.tag("user.id", userId)

// Your business logic... }

If you need more customization options for the Span or complete control over Context propagation and Span lifecycle then create a SpanBuilder instead.

def span[A](operationName: String, component: String)(f: => A): A

Creates an Internal Span that finishes automatically when the provided function finishes execution. If the provided function returns a scala.concurrent.Future or java.util.concurrent.CompletionStage implementation then the Span will be finished with the Future/CompletionState completes.

Creates an Internal Span that finishes automatically when the provided function finishes execution. If the provided function returns a scala.concurrent.Future or java.util.concurrent.CompletionStage implementation then the Span will be finished with the Future/CompletionState completes.

You can get access to the created Span within the provided function using Kamon.currentSpan. For example, if you wanted to add a tag to a Span created with this function you could do it as follows:

span("fetchUserDetails") { Kamon.currentSpan.tag("user.id", userId)

// Your business logic... }

If you need more customization options for the Span or complete control over Context propagation and Span lifecycle then create a SpanBuilder instead.

def spanBuilder(operationName: String): SpanBuilder

Creates a new raw SpanBuilder instance using the provided operation name.

Creates a new raw SpanBuilder instance using the provided operation name.

protected def tracer(): Tracer

The Tracer instance is only exposed to other Kamon components that need it like the Module Registry and Status

The Tracer instance is only exposed to other Kamon components that need it like the Module Registry and Status