KafkaInstrumentation

kamon.instrumentation.kafka.client.KafkaInstrumentation

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

object Keys

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Keys.type
case class Settings(startTraceOnProducer: Boolean, continueTraceOnConsumer: Boolean, useDelayedSpans: Boolean, propagator: KafkaPropagator)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final implicit class Syntax(val cr: ConsumerRecord[_, _]) extends AnyVal

Syntactical sugar to extract a Context from a ConsumerRecord instance.

Syntactical sugar to extract a Context from a ConsumerRecord instance.

Attributes

Supertypes
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def consumerSpan(record: ConsumerRecord[_, _]): Span

Creates a new consumer Span for the provided consumer record. The relationship between the trace on the producer side of the topic and the new consumer Span is controlled by the "continue-trace-on-consumer" setting:

Creates a new consumer Span for the provided consumer record. The relationship between the trace on the producer side of the topic and the new consumer Span is controlled by the "continue-trace-on-consumer" setting:

  • When enabled (default), the new consumer Span will be created as a child Span of the producer's Span. Both Spans will be part of the same trace.
  • When disabled, the new consumer Span will start a new trace, but will have a link to the Span on the producer side.

NOTE: Continuing or linking Spans to the trace on the producer side is only possible when automatic instrumentation is enabled. If you are running your application without Kanela then you will only get a simple consumer Span, without any connection to the original trace.

Attributes

def consumerSpan(record: ConsumerRecord[_, _], operationName: String): Span

Creates a new consumer Span for the provided consumer record. The relationship between the trace on the producer side of the topic and the new consumer Span is controlled by the "continue-trace-on-consumer" setting:

Creates a new consumer Span for the provided consumer record. The relationship between the trace on the producer side of the topic and the new consumer Span is controlled by the "continue-trace-on-consumer" setting:

  • When enabled (default), the new consumer Span will be created as a child Span of the producer's Span. Both Spans will be part of the same trace.
  • When disabled, the new consumer Span will start a new trace, but will have a link to the Span on the producer side.

NOTE: Continuing or linking Spans to the trace on the producer side is only possible when automatic instrumentation is enabled. If you are running your application without Kanela then you will only get a simple consumer Span, without any connection to the original trace.

Attributes

def copyHiddenState(from: ConsumerRecord[_, _], to: ConsumerRecord[_, _]): ConsumerRecord[_, _]

Copies internal state managed by Kamon from one consumer record to another, if possible. This utility is only necessary when there is custom code that creates ConsumerRecord instances which "forget" the consumer data that was injected by Kamon while calling the poll method.

Copies internal state managed by Kamon from one consumer record to another, if possible. This utility is only necessary when there is custom code that creates ConsumerRecord instances which "forget" the consumer data that was injected by Kamon while calling the poll method.

Attributes

def extractContext[K, V](consumerRecord: ConsumerRecord[K, V]): Context
def runWithConsumerSpan[T](record: ConsumerRecord[_, _])(f: => T): T

Creates a new consumer Span for the provided consumer record and sets it as the current Span while running the provided block of code. This function can optionally finish the Span once the code block execution has finished.

Creates a new consumer Span for the provided consumer record and sets it as the current Span while running the provided block of code. This function can optionally finish the Span once the code block execution has finished.

The relationship between the trace on the producer side of the topic and the new consumer Span is controlled by the "continue-trace-on-consumer" setting:

  • When enabled (default), the new consumer Span will be created as a child Span of the producer's Span. Both Spans will be part of the same trace.
  • When disabled, the new consumer Span will start a new trace, but will have a link to the Span on the producer side.

NOTE: Continuing or linking Spans to the trace on the producer side is only possible when automatic instrumentation is enabled. If you are running your application without Kanela then you will only get a simple consumer Span, without any connection to the original trace.

Attributes

def runWithConsumerSpan[T](record: ConsumerRecord[_, _], operationName: String)(f: => T): T

Creates a new consumer Span for the provided consumer record and sets it as the current Span while running the provided block of code. This function can optionally finish the Span once the code block execution has finished.

Creates a new consumer Span for the provided consumer record and sets it as the current Span while running the provided block of code. This function can optionally finish the Span once the code block execution has finished.

The relationship between the trace on the producer side of the topic and the new consumer Span is controlled by the "continue-trace-on-consumer" setting:

  • When enabled (default), the new consumer Span will be created as a child Span of the producer's Span. Both Spans will be part of the same trace.
  • When disabled, the new consumer Span will start a new trace, but will have a link to the Span on the producer side.

NOTE: Continuing or linking Spans to the trace on the producer side is only possible when automatic instrumentation is enabled. If you are running your application without Kanela then you will only get a simple consumer Span, without any connection to the original trace.

Attributes

def runWithConsumerSpan[T](record: ConsumerRecord[_, _], operationName: String, finishSpan: Boolean)(f: => T): T

Creates a new consumer Span for the provided consumer record and sets it as the current Span while running the provided block of code. This function can optionally finish the Span once the code block execution has finished.

Creates a new consumer Span for the provided consumer record and sets it as the current Span while running the provided block of code. This function can optionally finish the Span once the code block execution has finished.

The relationship between the trace on the producer side of the topic and the new consumer Span is controlled by the "continue-trace-on-consumer" setting:

  • When enabled (default), the new consumer Span will be created as a child Span of the producer's Span. Both Spans will be part of the same trace.
  • When disabled, the new consumer Span will start a new trace, but will have a link to the Span on the producer side.

NOTE: Continuing or linking Spans to the trace on the producer side is only possible when automatic instrumentation is enabled. If you are running your application without Kanela then you will only get a simple consumer Span, without any connection to the original trace.

Attributes

Implicits

Implicits

final implicit def Syntax(cr: ConsumerRecord[_, _]): Syntax

Syntactical sugar to extract a Context from a ConsumerRecord instance.

Syntactical sugar to extract a Context from a ConsumerRecord instance.

Attributes