feat(correlation): Added correlation ID to topology service client
What does this MR do and why?
Adding CorrelationID to topology service client.
References
Part of: gitlab-com/gl-infra/tenant-scale/cells-infrastructure/team#458
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Start GDK with Cells enabled
- Configure topology-service to use
main
branch - In a terminal tail topology-service logs
gdk tail gitlab-topology-service
- In another terminal open rails console
rails c
- Get the latest Correlation ID from Labkit library
[1] pry(main)> Labkit::Correlation::CorrelationId.current_or_new_id
=> "c1ae6f592faa2e5fdd37688bb8b72d89"
- Request new cells sequence from the topology service. This request might fail, but it doesn't matter.
[2] pry(main)> Gitlab::TopologyServiceClient::CellService.new.cell_sequence_ranges
GRPC::PermissionDenied: 7:permission denied. debug_error_string:{UNKNOWN:Error received from peer {grpc_status:7, grpc_message:"permission denied"}}
from /Users/vglafirov/.local/share/mise/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/grpc-1.75.0-arm64-darwin/src/ruby/lib/grpc/generic/active_call.rb:29:in `check_status'
[3] pry(main)>
- In Topology service logs, check if CorrelatinID from Rails (step 5) is the same as correlation ID in logs.
2025-10-22_13:22:12.95785 gitlab-topology-service : {"correlation_id":"c1ae6f592faa2e5fdd37688bb8b72d89","grpc.code":"PermissionDenied","grpc.component":"server","grpc.err
or":"rpc error: code = PermissionDenied desc = permission denied","grpc.method":"GetCell","grpc.method_type":"unary","grpc.request.deadline":"2025-10-22T15:22:13+02:00","g
rpc.request.size":2,"grpc.service":"gitlab.cells.topology_service.CellService","grpc.start_time":"2025-10-22T15:22:12+02:00","grpc.time_ms":"3.64","level":"warning","msg":
"finished call","peer.address":"[::1]:60852","protocol":"grpc","remote_ip":"::1","system":"grpc","time":"2025-10-22T15:22:12+02:00"}
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Vladimir Glafirov