[
https://issues.apache.org/jira/browse/PROTON-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17510810#comment-17510810
]
ASF GitHub Bot commented on PROTON-2487:
----------------------------------------
astitcher commented on a change in pull request #355:
URL: https://github.com/apache/qpid-proton/pull/355#discussion_r832369735
##########
File path: cpp/include/proton/tracing.hpp
##########
@@ -0,0 +1,43 @@
+#ifndef PROTON_TRACING_HPP
+#define PROTON_TRACING_HPP
+
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#include "./internal/export.hpp"
+
+/// @file
+/// @copybrief proton::tracing
+
+#ifdef ENABLE_OPENTELEMETRYCPP
Review comment:
Don't need this and it won't be available when a user compiles against
proton
##########
File path: cpp/src/tracing_stub.cpp
##########
@@ -0,0 +1,52 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#include <proton/tracing.hpp>
+#include <proton/annotation_key.hpp>
+#include <proton/message.hpp>
+#include <proton/messaging_handler.hpp>
+
+#include "tracing_private.hpp"
+
+namespace proton
+{
+
+class StubTracing : public Tracing {
+ public:
+ void message_encode(const message& m, std::vector<char>& buf, const
binary& tag, const tracker& track) override {
+ m.encode(buf);
+ }
+
+ void on_message_handler(messaging_handler& h, delivery& d, message&
message) override {
+ h.on_message(d, message);
+ }
+
+ void on_settled_span(tracker& track) override {}
+};
+
+static StubTracing dummy;
+Tracing* Tracing::the = &dummy;
+
+Tracing& Tracing::getTracing() { return *the; }
+
+void Tracing::activate(Tracing& r) { Tracing::the = &r; }
Review comment:
These could be defined inline in tracing_private.hpp
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> [cpp] Implement distributed tracing
> -----------------------------------
>
> Key: PROTON-2487
> URL: https://issues.apache.org/jira/browse/PROTON-2487
> Project: Qpid Proton
> Issue Type: New Feature
> Components: cpp-binding
> Affects Versions: proton-c-0.37.0
> Reporter: Rakhi Kumari
> Assignee: Rakhi Kumari
> Priority: Major
> Fix For: proton-c-0.38.0
>
>
> Implement distributed tracing using opentelemetry.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]