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/08/23 12:52:18 UTC

[GitHub] [doris] cambyzju commented on a diff in pull request #11856: [fix](tracing) Fix opentelemetry log output to be.out

cambyzju commented on code in PR #11856:
URL: https://github.com/apache/doris/pull/11856#discussion_r952584000


##########
be/src/util/telemetry/telemetry.cpp:
##########
@@ -38,6 +40,26 @@ namespace zipkin = opentelemetry::exporter::zipkin;
 namespace resource = opentelemetry::sdk::resource;
 namespace propagation = opentelemetry::context::propagation;
 namespace otlp = opentelemetry::exporter::otlp;
+namespace internal_log = opentelemetry::sdk::common::internal_log;
+
+class OpenTelemetryLogHandler : public internal_log::LogHandler {
+public:
+    void Handle(internal_log::LogLevel level, const char* file, int line, const char* msg,
+                const opentelemetry::sdk::common::AttributeMap& attributes) noexcept override {
+        if (level == internal_log::LogLevel::Error || level == internal_log::LogLevel::Warning) {
+            std::stringstream output_s;

Review Comment:
   performance maybe a problem with `std::stringstream`



-- 
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