-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ales Justin <[email protected]>
- Loading branch information
Showing
13 changed files
with
253 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
src/main/java/io/strimzi/kafka/bridge/tracing/NoopTracingHandle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* Copyright Strimzi authors. | ||
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). | ||
*/ | ||
|
||
package io.strimzi.kafka.bridge.tracing; | ||
|
||
import io.strimzi.kafka.bridge.config.BridgeConfig; | ||
import io.vertx.ext.web.RoutingContext; | ||
import io.vertx.kafka.client.consumer.KafkaConsumerRecord; | ||
import io.vertx.kafka.client.producer.KafkaProducerRecord; | ||
|
||
import java.util.Properties; | ||
|
||
final class NoopTracingHandle implements TracingHandle { | ||
@Override | ||
public String envName() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String serviceName(BridgeConfig config) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
} | ||
|
||
@Override | ||
public <K, V> SpanBuilderHandle<K, V> builder(RoutingContext routingContext, String operationName) { | ||
return new NoopSpanBuilderHandle<>(); | ||
} | ||
|
||
@Override | ||
public <K, V> SpanHandle<K, V> span(RoutingContext routingContext, String operationName) { | ||
return new NoopSpanHandle<>(); | ||
} | ||
|
||
@Override | ||
public <K, V> void handleRecordSpan(SpanHandle<K, V> parentSpanHandle, KafkaConsumerRecord<K, V> record) { | ||
} | ||
|
||
@Override | ||
public void kafkaConsumerConfig(Properties props) { | ||
} | ||
|
||
@Override | ||
public void kafkaProducerConfig(Properties props) { | ||
} | ||
|
||
private static final class NoopSpanBuilderHandle<K, V> implements SpanBuilderHandle<K, V> { | ||
@Override | ||
public SpanHandle<K, V> span(RoutingContext routingContext) { | ||
return new NoopSpanHandle<>(); | ||
} | ||
} | ||
|
||
private static final class NoopSpanHandle<K, V> implements SpanHandle<K, V> { | ||
@Override | ||
public void inject(KafkaProducerRecord<K, V> record) { | ||
} | ||
|
||
@Override | ||
public void inject(RoutingContext routingContext) { | ||
} | ||
|
||
@Override | ||
public void finish(int code) { | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.