userver
C++ Async Framework
Loading...
Searching...
No Matches
tracer.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/components/tracer.hpp
4
/// @brief @copybrief components::Tracer
5
6
#
include
<
userver
/
components
/
component_fwd
.
hpp
>
7
#
include
<
userver
/
components
/
impl
/
component_base
.
hpp
>
8
9
USERVER_NAMESPACE_BEGIN
10
11
namespace
components
{
12
13
// clang-format off
14
15
/// @ingroup userver_components
16
///
17
/// @brief Component that initializes the request tracing facilities.
18
///
19
/// Finds the components::Logging component and requests an optional
20
/// "opentracing" logger to use for Opentracing.
21
///
22
/// The component must be configured in service config.
23
///
24
/// ## Static options:
25
/// Name | Description | Default value
26
/// ---- | ----------- | -------------
27
/// service-name | name of the service to write in traces | -
28
/// tracer | type of the tracer to trace, currently supported only 'native' | 'native'
29
///
30
/// ## Static configuration example:
31
///
32
/// @snippet components/common_component_list_test.cpp Sample tracer component config
33
34
// clang-format on
35
class
Tracer
final
:
public
impl::ComponentBase {
36
public
:
37
/// @ingroup userver_component_names
38
/// @brief The default name of components::Tracer
39
static
constexpr
std
::
string_view
kName
=
"tracer"
;
40
41
Tracer(
const
ComponentConfig& config,
const
ComponentContext& context);
42
43
static
yaml_config
::Schema GetStaticConfigSchema();
44
};
45
46
template
<>
47
inline
constexpr
bool
kHasValidate<Tracer> =
true
;
48
49
}
// namespace components
50
51
USERVER_NAMESPACE_END
userver
components
tracer.hpp
Generated on Wed Oct 4 2023 12:12:06 for userver by
Doxygen
1.9.8