userver
C++ Async Framework
Loading...
Searching...
No Matches
component.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/tracing/component.hpp
4
/// @brief @copybrief components::Tracer
5
6
#
include
<
userver
/
components
/
component_fwd
.
hpp
>
7
#
include
<
userver
/
components
/
raw_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.
20
///
21
/// The component must be configured in service config.
22
///
23
/// ## Static options:
24
/// Name | Description | Default value
25
/// ---- | ----------- | -------------
26
/// service-name | name of the service to write in traces | ''
27
/// tracer | type of the tracer to trace, currently supported only 'native' | 'native'
28
///
29
/// ## Static configuration example:
30
///
31
/// @snippet components/common_component_list_test.cpp Sample tracer component config
32
33
// clang-format on
34
class
Tracer
final
:
public
RawComponentBase
{
35
public
:
36
/// @ingroup userver_component_names
37
/// @brief The default name of components::Tracer
38
static
constexpr
std
::
string_view
kName
=
"tracer"
;
39
40
Tracer(
const
ComponentConfig& config,
const
ComponentContext& context);
41
42
static
yaml_config
::Schema GetStaticConfigSchema();
43
};
44
45
template
<>
46
inline
constexpr
bool
kHasValidate<Tracer> =
true
;
47
48
template
<>
49
inline
constexpr
auto
kConfigFileMode<Tracer> =
ConfigFileMode
::
kNotRequired
;
50
51
}
// namespace components
52
53
USERVER_NAMESPACE_END
userver
tracing
component.hpp
Generated on Tue Nov 19 2024 11:27:14 for userver by
Doxygen
1.10.0