File tree 2 files changed +8
-0
lines changed
include/ydb-cpp-sdk/client/types
src/client/impl/ydb_internal/rpc_request_settings 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
#include < vector>
10
10
#include < utility>
11
+ #include < string>
11
12
12
13
namespace NYdb ::inline V3 {
13
14
@@ -20,6 +21,7 @@ struct TRequestSettings {
20
21
FLUENT_SETTING (std::string, RequestType);
21
22
FLUENT_SETTING (THeader, Header);
22
23
FLUENT_SETTING (TDuration, ClientTimeout);
24
+ FLUENT_SETTING (std::string, TraceParent);
23
25
24
26
TRequestSettings () = default ;
25
27
@@ -29,6 +31,7 @@ struct TRequestSettings {
29
31
, RequestType_(other.RequestType_)
30
32
, Header_(other.Header_)
31
33
, ClientTimeout_(other.ClientTimeout_)
34
+ , TraceParent_(other.TraceParent_)
32
35
{}
33
36
};
34
37
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ struct TRpcRequestSettings {
24
24
rpcSettings.TraceId = settings.TraceId_ ;
25
25
rpcSettings.RequestType = settings.RequestType_ ;
26
26
rpcSettings.Header = settings.Header_ ;
27
+
28
+ if (!settings.TraceParent_ .empty ()) {
29
+ rpcSettings.Header .emplace_back (" traceparent" , settings.TraceParent_ );
30
+ }
31
+
27
32
rpcSettings.PreferredEndpoint = preferredEndpoint;
28
33
rpcSettings.EndpointPolicy = endpointPolicy;
29
34
rpcSettings.UseAuth = true ;
You can’t perform that action at this time.
0 commit comments