userver
C++ Async Framework
Loading...
Searching...
No Matches
generic_options.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/ugrpc/client/generic_options.hpp
4
/// @brief @copybrief ugrpc::client::GenericOptions
5
6
#
include
<
optional
>
7
#
include
<
string_view
>
8
9
USERVER_NAMESPACE_BEGIN
10
11
namespace
ugrpc::client {
12
13
struct
GenericOptions
{
14
/// If non-`nullopt`, metrics are accounted for specified fake call name.
15
/// If `nullopt`, writes a set of metrics per real call name.
16
/// If the microservice serves as a proxy and has untrusted clients, it is
17
/// a good idea to have this option set to non-`nullopt` to avoid
18
/// the situations where an upstream client can spam various RPCs with
19
/// non-existent names, which leads to this microservice spamming RPCs
20
/// with non-existent names, which leads to creating storage for infinite
21
/// metrics and causes OOM.
22
/// The default is to specify `"Generic/Generic"` fake call name.
23
std::optional<std::string_view>
metrics_call_name
{
"Generic/Generic"
};
24
};
25
26
}
// namespace ugrpc::client
27
28
USERVER_NAMESPACE_END
userver
ugrpc
client
generic_options.hpp
Generated on Fri Aug 22 2025 11:37:55 for userver by
Doxygen
1.9.8