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
/// @ingroup userver_components
14
///
15
/// @brief Component that initializes the request tracing facilities.
16
///
17
/// Finds the components::Logging component.
18
///
19
/// The component must be configured in service config.
20
///
21
/// ## Static options of components::Tracer :
22
/// @include{doc} scripts/docs/en/components_schema/core/src/tracing/component.md
23
///
24
/// Options inherited from @ref components::ComponentBase :
25
/// @include{doc} scripts/docs/en/components_schema/core/src/components/impl/component_base.md
26
///
27
/// ## Static configuration example:
28
///
29
/// @snippet components/common_component_list_test.cpp Sample tracer component config
30
class
Tracer
final
:
public
RawComponentBase
{
31
public
:
32
/// @ingroup userver_component_names
33
/// @brief The default name of @ref components::Tracer
34
static
constexpr
std::string_view
kName
=
"tracer"
;
35
36
Tracer(
const
ComponentConfig& config,
const
ComponentContext& context);
37
38
static
yaml_config
::Schema GetStaticConfigSchema();
39
};
40
41
template
<>
42
inline
constexpr
bool
kHasValidate<Tracer> =
true
;
43
44
template
<>
45
inline
constexpr
auto
kConfigFileMode<Tracer> =
ConfigFileMode
::
kNotRequired
;
46
47
}
// namespace components
48
49
USERVER_NAMESPACE_END
userver
tracing
component.hpp
Generated on Fri Dec 5 2025 12:21:15 for userver by
Doxygen
1.13.2