DreamPearl commented on a change in pull request #355: URL: https://github.com/apache/qpid-proton/pull/355#discussion_r831959465
########## File path: cpp/src/tracing_private.hpp ########## @@ -0,0 +1,54 @@ +#ifndef PROTON_INTERNAL_TRACING_HPP +#define PROTON_INTERNAL_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. + * + */ + +namespace proton { + +class message; +class delivery; +class tracker; +class binary; + +/// Base class for OpentelemetryTracing and DummyTracing. An interface for Tracing. +class Tracing { + + static Tracing* the; + + public: + /// Returns an object for the Tracing. If Tracing is enable, returns the object of OpentelemetryTracing. + /// By default returns the object of DummyTracing. + static Tracing& getTracing(); + + /// Initialize the Tracing object with the OpentelemetryTracing object. + static void activate(Tracing& r); + + virtual void message_encode(const message &m, std::vector<char> &buf, const binary &tag, const tracker &track) = 0; + virtual void on_message_handler(messaging_handler& h, delivery& d, message& message) = 0; + virtual void on_settled_span(delivery& d, tracker& track) = 0; Review comment: This reminds me, I worked on adding an accessor for the delivery tag on the tracker later after writing this code. So yeah now we do have C++ API for that. Thanks! -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
