Class KafkaTelemetryBuilder
java.lang.Object
io.micronaut.tracing.opentelemetry.instrument.kafka.KafkaTelemetryBuilder
Builder class for KafkaTelemetry object.
- Since:
- 5.0.0
-
Constructor Summary
ConstructorDescriptionKafkaTelemetryBuilder
(io.opentelemetry.api.OpenTelemetry openTelemetry, KafkaTelemetryConfiguration kafkaTelemetryConfiguration, Collection<KafkaTelemetryConsumerTracingFilter> consumerTracingFilters, Collection<KafkaTelemetryProducerTracingFilter> producerTracingFilters) -
Method Summary
Modifier and TypeMethodDescriptionaddConsumerAttributesExtractors
(io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<io.opentelemetry.instrumentation.kafka.internal.KafkaProcessRequest, Void> extractor) addProducerAttributesExtractors
(io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<io.opentelemetry.instrumentation.kafka.internal.KafkaProducerRequest, org.apache.kafka.clients.producer.RecordMetadata> extractor) build()
void
setCaptureExperimentalSpanAttributes
(boolean captureExperimentalSpanAttributes) void
setPropagationEnabled
(boolean propagationEnabled)
-
Constructor Details
-
KafkaTelemetryBuilder
public KafkaTelemetryBuilder(io.opentelemetry.api.OpenTelemetry openTelemetry, KafkaTelemetryConfiguration kafkaTelemetryConfiguration, Collection<KafkaTelemetryConsumerTracingFilter> consumerTracingFilters, Collection<KafkaTelemetryProducerTracingFilter> producerTracingFilters)
-
-
Method Details
-
addProducerAttributesExtractors
public KafkaTelemetryBuilder addProducerAttributesExtractors(io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<io.opentelemetry.instrumentation.kafka.internal.KafkaProducerRequest, org.apache.kafka.clients.producer.RecordMetadata> extractor) -
addConsumerAttributesExtractors
public KafkaTelemetryBuilder addConsumerAttributesExtractors(io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<io.opentelemetry.instrumentation.kafka.internal.KafkaProcessRequest, Void> extractor) -
build
-
setCaptureExperimentalSpanAttributes
public void setCaptureExperimentalSpanAttributes(boolean captureExperimentalSpanAttributes) -
setPropagationEnabled
public void setPropagationEnabled(boolean propagationEnabled)
-