Line data Source code
1 : #include "source/extensions/tracers/zipkin/config.h" 2 : 3 : #include "envoy/config/trace/v3/zipkin.pb.h" 4 : #include "envoy/config/trace/v3/zipkin.pb.validate.h" 5 : #include "envoy/registry/registry.h" 6 : 7 : #include "source/common/common/utility.h" 8 : #include "source/extensions/tracers/zipkin/zipkin_tracer_impl.h" 9 : 10 : namespace Envoy { 11 : namespace Extensions { 12 : namespace Tracers { 13 : namespace Zipkin { 14 : 15 2 : ZipkinTracerFactory::ZipkinTracerFactory() : FactoryBase("envoy.tracers.zipkin") {} 16 : 17 : Tracing::DriverSharedPtr ZipkinTracerFactory::createTracerDriverTyped( 18 : const envoy::config::trace::v3::ZipkinConfig& proto_config, 19 0 : Server::Configuration::TracerFactoryContext& context) { 20 0 : return std::make_shared<Zipkin::Driver>( 21 0 : proto_config, context.serverFactoryContext().clusterManager(), 22 0 : context.serverFactoryContext().scope(), context.serverFactoryContext().threadLocal(), 23 0 : context.serverFactoryContext().runtime(), context.serverFactoryContext().localInfo(), 24 0 : context.serverFactoryContext().api().randomGenerator(), 25 0 : context.serverFactoryContext().timeSource()); 26 0 : } 27 : 28 : /** 29 : * Static registration for the Zipkin tracer. @see RegisterFactory. 30 : */ 31 : LEGACY_REGISTER_FACTORY(ZipkinTracerFactory, Server::Configuration::TracerFactory, "envoy.zipkin"); 32 : 33 : } // namespace Zipkin 34 : } // namespace Tracers 35 : } // namespace Extensions 36 : } // namespace Envoy