libbmq 2f89e4a12c66e1eef53d27df596a2d59742f6a67
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bmqpi_dtcontext.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_dtcontext.h -*-C++-*-
17#ifndef INCLUDED_BMQPI_DTCONTEXT
18#define INCLUDED_BMQPI_DTCONTEXT
19
38
39// BMQ
40
41#include <bmqpi_dtspan.h>
42
43// BDE
44#include <bsl_memory.h>
45#include <bslma_managedptr.h>
46
47namespace BloombergLP {
48namespace bmqpi {
49
50// ===============
51// class DTContext
52// ===============
53
55class DTContext {
56 public:
57 // PUBLIC CREATORS
58
60 virtual ~DTContext();
61
62 // PUBLIC ACCESSORS
63
67 virtual bsl::shared_ptr<bmqpi::DTSpan> span() const = 0;
68
69 // PUBLIC MANIPULATORS
70
82 virtual bslma::ManagedPtr<void>
83 scope(const bsl::shared_ptr<DTSpan>& newSpan) = 0;
84};
85
86} // close package namespace
87} // close enterprise namespace
88
89#endif
Provide an interface representing a span of a distributed trace.
A pure interface for a context with a notion of a current span.
Definition bmqpi_dtcontext.h:55
virtual bsl::shared_ptr< bmqpi::DTSpan > span() const =0
virtual bslma::ManagedPtr< void > scope(const bsl::shared_ptr< DTSpan > &newSpan)=0
virtual ~DTContext()
Destructor.
Definition bmqa_abstractsession.h:42