Skip to content

Commit

Permalink
Added database attribute to grpc request proxy span
Browse files Browse the repository at this point in the history
  • Loading branch information
domwst committed Feb 22, 2024
1 parent da561aa commit e36bbe7
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 e36bbe7

Please sign in to comment.