You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/15 06:17:49 UTC

[GitHub] [doris] yangzhg commented on a diff in pull request #10864: [tracing] Support opentelemtry collector.

yangzhg commented on code in PR #10864:
URL: https://github.com/apache/doris/pull/10864#discussion_r921847304


##########
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 {};

Review Comment:
   ```suggestion
       std::unique_ptr<trace_sdk::SpanExporter> exporter = std::make_unique<trace_sdk::SpanExporter>();
   ```



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org