morningman commented on code in PR #10864: URL: https://github.com/apache/doris/pull/10864#discussion_r928359290
########## be/src/util/telemetry/telemetry.cpp: ########## @@ -34,16 +35,24 @@ namespace trace_sdk = opentelemetry::sdk::trace; namespace zipkin = opentelemetry::exporter::zipkin; namespace resource = opentelemetry::sdk::resource; namespace propagation = opentelemetry::context::propagation; +namespace otlp = opentelemetry::exporter::otlp; -void doris::telemetry::initTracer() { +void doris::telemetry::init_tracer() { if (!doris::config::enable_tracing) { return; } - // ZipkinExporter converts span to zipkin's format and exports span to zipkin. - zipkin::ZipkinExporterOptions opts; - opts.endpoint = doris::config::trace_export_url; - auto exporter = std::unique_ptr<trace_sdk::SpanExporter>(new zipkin::ZipkinExporter(opts)); + std::unique_ptr<trace_sdk::SpanExporter> exporter = nullptr; + if (doris::config::enable_otel_collector) { Review Comment: maybe we should use `tracing_collector_type` config instead of `enable_otel_collector`? So that if we support the 3rd type of collectors, we can simply name it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org