Skip to content
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
3 changes: 1 addition & 2 deletions ydb/core/grpc_services/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,7 @@ class TRefreshTokenImpl
}

const TMaybe<TString> GetPeerMetaValues(const TString&) const override {
Y_ABORT("Unimplemented");
return TMaybe<TString>{};
return {};
}

TVector<TStringBuf> FindClientCert() const override {
Expand Down
11 changes: 7 additions & 4 deletions ydb/core/grpc_services/grpc_request_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class TGRpcRequestProxyImpl
}


//StartTracing(*requestBaseCtx);
StartTracing(*requestBaseCtx);

if (IsAuthStateOK(*requestBaseCtx)) {
Handle(event, ctx);
Expand Down Expand Up @@ -410,9 +410,12 @@ bool TGRpcRequestProxyImpl::IsAuthStateOK(const IRequestProxyCtx& ctx) {
}

void TGRpcRequestProxyImpl::StartTracing(IRequestProxyCtx& ctx) {
auto traceId = NWilson::TTraceId::NewTraceId(15, Max<ui32>());
NWilson::TSpan grpcRequestProxySpan(TWilsonGrpc::RequestProxy, std::move(traceId), "GrpcRequestProxy");
ctx.StartTracing(std::move(grpcRequestProxySpan));
if (const auto otelHeader = ctx.GetPeerMetaValues(NYdb::OTEL_TRACE_HEADER)) {
if (auto traceId = NWilson::TTraceId::FromTraceparentHeader(otelHeader.GetRef())) {
NWilson::TSpan grpcRequestProxySpan(TWilsonGrpc::RequestProxy, std::move(traceId), "GrpcRequestProxy");
ctx.StartTracing(std::move(grpcRequestProxySpan));
}
}
}

void TGRpcRequestProxyImpl::HandleSchemeBoard(TSchemeBoardEvents::TEvNotifyUpdate::TPtr& ev, const TActorContext& ctx) {
Expand Down