libbmq  a5f8a06ba1d16cb5a65643e1fa7f1a1d6aadef40
bmqpi_dttracer.h
Go to the documentation of this file.
1 // Copyright 2021-2023 Bloomberg Finance L.P.
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 // bmqpi_dttracer.h -*-C++-*-
17 #ifndef INCLUDED_BMQPI_DTTRACER
18 #define INCLUDED_BMQPI_DTTRACER
19 
27 
28 // BMQ
29 
30 #include <bmqpi_dtspan.h>
31 
32 // BDE
33 #include <bsl_memory.h>
34 #include <bsl_string_view.h>
35 
36 namespace BloombergLP {
37 namespace bmqpi {
38 
39 // ==============
40 // class DTTracer
41 // ==============
42 
44 class DTTracer {
45  public:
46  // PUBLIC CREATORS
47 
49  virtual ~DTTracer();
50 
51  // PUBLIC METHODS
52 
55  virtual bsl::shared_ptr<DTSpan> createChildSpan(
56  const bsl::shared_ptr<DTSpan>& parent,
57  const bsl::string_view& operation,
58  const DTSpan::Baggage& baggage = DTSpan::Baggage()) const = 0;
59 };
60 
61 } // close package namespace
62 } // close enterprise namespace
63 
64 #endif
Provide an interface representing a span of a distributed trace.
A set of key-values used to describe a DTSpan.
Definition: bmqpi_dtspan.h:66
A pure interface for creators of DTSpan objects.
Definition: bmqpi_dttracer.h:44
virtual bsl::shared_ptr< DTSpan > createChildSpan(const bsl::shared_ptr< DTSpan > &parent, const bsl::string_view &operation, const DTSpan::Baggage &baggage=DTSpan::Baggage()) const =0
virtual ~DTTracer()
Destructor.
Definition: bmqa_abstractsession.h:42