Skip to content

Commit 95d1723

Browse files
Copilottrask
andcommitted
Mark TracingConsumerInterceptor and TracingProducerInterceptor as deprecated
Co-authored-by: trask <[email protected]>
1 parent 7703b1d commit 95d1723

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

instrumentation/kafka/kafka-clients/kafka-clients-2.6/library/src/main/java/io/opentelemetry/instrumentation/kafkaclients/v2_6/TracingConsumerInterceptor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@
2626
* A ConsumerInterceptor that adds tracing capability. Add this interceptor's class name or class
2727
* via ConsumerConfig.INTERCEPTOR_CLASSES_CONFIG property to your Consumer's properties to get it
2828
* instantiated and used. See more details on ConsumerInterceptor usage in its Javadoc.
29+
*
30+
* @deprecated Use {@link OpenTelemetryConsumerInterceptor} instead. This class uses {@link
31+
* GlobalOpenTelemetry} and is not configurable. The new class allows you to pass a configured
32+
* {@link KafkaTelemetry} instance.
2933
*/
34+
@Deprecated
3035
public class TracingConsumerInterceptor<K, V> implements ConsumerInterceptor<K, V> {
3136

3237
private static final KafkaTelemetry telemetry =

instrumentation/kafka/kafka-clients/kafka-clients-2.6/library/src/main/java/io/opentelemetry/instrumentation/kafkaclients/v2_6/TracingProducerInterceptor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@
2222
* A ProducerInterceptor that adds tracing capability. Add this interceptor's class name or class
2323
* via ProducerConfig.INTERCEPTOR_CLASSES_CONFIG property to your Producer's properties to get it
2424
* instantiated and used. See more details on ProducerInterceptor usage in its Javadoc.
25+
*
26+
* @deprecated Use {@link OpenTelemetryProducerInterceptor} instead. This class uses {@link
27+
* GlobalOpenTelemetry} and is not configurable. The new class allows you to pass a configured
28+
* {@link KafkaTelemetry} instance.
2529
*/
30+
@Deprecated
2631
public class TracingProducerInterceptor<K, V> implements ProducerInterceptor<K, V> {
2732

2833
private static final KafkaTelemetry telemetry =

0 commit comments

Comments
 (0)