Skip to content

KIKIMR-20533 Forward traceparent header to KV-tablet #689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions ydb/core/grpc_services/rpc_deferrable.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
#include "cancelation/cancelation_event.h"
#include "rpc_common/rpc_common.h"

#include <ydb/core/tx/tx_proxy/proxy.h>
#include <ydb/library/ydb_issue/issue_helpers.h>
#include <ydb/core/base/tablet_pipe.h>
#include <ydb/core/protos/flat_tx_scheme.pb.h>
#include <ydb/core/tx/schemeshard/schemeshard.h>
#include <ydb/core/tx/tx_proxy/proxy.h>
#include <ydb/library/wilson_ids/wilson.h>
#include <ydb/library/ydb_issue/issue_helpers.h>
#include <ydb/public/api/protos/ydb_status_codes.pb.h>
#include <ydb/public/lib/operation_id/operation_id.h>

Expand Down Expand Up @@ -150,6 +151,8 @@ class TRpcOperationRequestActor : public TRpcRequestWithOperationParamsActor<TDe

TRpcOperationRequestActor(IRequestOpCtx* request)
: TBase(request)
, Span_(TWilsonGrpc::RequestActor, request->GetWilsonTraceId(),
"RequestProxy.RpcOperationRequestActor", NWilson::EFlags::AUTO_END)
{}

static constexpr NKikimrServices::TActivity::EType ActorActivityType() {
Expand Down Expand Up @@ -280,6 +283,9 @@ class TRpcOperationRequestActor : public TRpcRequestWithOperationParamsActor<TDe
auto as = TActivationContext::ActorSystem();
PassSubscription(ev->Get(), Request_.get(), as);
}

protected:
NWilson::TSpan Span_;
};

} // namespace NGRpcService
Expand Down
4 changes: 2 additions & 2 deletions ydb/core/grpc_services/rpc_keyvalue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ class TBaseKeyValueRequest {
req->UserToken = UserToken;
req->DatabaseName = self->Request_->GetDatabaseName().GetOrElse("");
auto ev = new TEvTxProxySchemeCache::TEvNavigateKeySet(req.Release());
self->Send(MakeSchemeCacheID(), ev);
self->Send(MakeSchemeCacheID(), ev, 0, 0, self->Span_.GetTraceId());
}

bool OnNavigateKeySetResult(TEvTxProxySchemeCache::TEvNavigateKeySetResult::TPtr &ev, ui32 access) {
Expand Down Expand Up @@ -818,7 +818,7 @@ class TKeyValueRequestGrpc
auto &rec = *this->GetProtoRequest();
CopyProtobuf(rec, &req->Record);
req->Record.set_tablet_id(KVTabletId);
NTabletPipe::SendData(this->SelfId(), KVPipeClient, req.release(), 0);
NTabletPipe::SendData(this->SelfId(), KVPipeClient, req.release(), 0, TBase::Span_.GetTraceId());
}

void Handle(typename TKVRequest::TResponse::TPtr &ev) {
Expand Down
1 change: 1 addition & 0 deletions ydb/library/wilson_ids/wilson.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ namespace NKikimr {
struct TWilsonGrpc {
enum {
RequestProxy = 9,
RequestActor = 9,
};
};

Expand Down