Skip to content

Commit

Permalink
Added database attribute to grpc request proxy span (ydb-platform#2161)
Browse files Browse the repository at this point in the history
  • Loading branch information
domwst committed Mar 11, 2024
1 parent 4ccec44 commit 1b8e577
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ydb/core/grpc_services/grpc_request_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ void TGRpcRequestProxyImpl::MaybeStartTracing(IRequestProxyCtx& ctx) {
TracingControl->HandleTracing(traceId, ctx.GetRequestDiscriminator());
if (traceId) {
NWilson::TSpan grpcRequestProxySpan(TWilsonGrpc::RequestProxy, std::move(traceId), "GrpcRequestProxy");
if (auto database = ctx.GetDatabaseName()) {
grpcRequestProxySpan.Attribute("database", std::move(*database));
}
ctx.StartTracing(std::move(grpcRequestProxySpan));
}
}
Expand Down

0 comments on commit 1b8e577

Please sign in to comment.