All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.strimzi.kafka.bridge.tracing.NoopTracingHandle Maven / Gradle / Ivy

The newest version!
/*
 * 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 org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.producer.ProducerRecord;

import java.util.Properties;

final class NoopTracingHandle implements TracingHandle {
    @Override
    public String envServiceName() {
        return null;
    }

    @Override
    public String serviceName(BridgeConfig config) {
        return null;
    }

    @Override
    public void initialize() {
    }

    @Override
    public  SpanHandle span(RoutingContext routingContext, String operationName) {
        return new NoopSpanHandle<>();
    }

    @Override
    public  void handleRecordSpan(ConsumerRecord record) {
    }

    @Override
    public void addTracingPropsToProducerConfig(Properties props) {
    }

    private static final class NoopSpanHandle implements SpanHandle {
        @Override
        public void inject(ProducerRecord record) {
        }

        @Override
        public void inject(RoutingContext routingContext) {
        }

        @Override
        public void finish(int code) {
        }

        @Override
        public void finish(int code, Throwable cause) {
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy