Send correlation ID to SDS
What does this MR do and why?
So that groupsecret detection can track requests from the monolith to SDS to confirm that all requests are being received by SDS, this MR adds the correlation ID on the request type (when it's dark launch) to the headers in the SDS request.
This MR also logs when a request is made to SDS and logs the response. These logs include the correlation ID and the request type. Example logs are:
Secret Detection monolith logs
{"severity":"INFO","time":"2025-08-26T05:45:13.346Z","correlation_id":"01K3JEHDCXWC4RT1139C1TJRCD","meta.caller_id":"POST /api/:version/internal/allowed","meta.remote_ip":"172.16.123.1","meta.feature_category":"source_code_management","meta.user":"root","meta.user_id":1,"meta.project":"root/enable-spp-public-project","meta.root_namespace":"root","meta.client_id":"user/1","meta.organization_id":1,"message":"Sending request to SDS with type: dark-launch"}
SDS logs
{:message=>"gRPC Request summary", :payload=>{:grpc_method=>"gitlab.secret_detection.Scanner/Scan", :status_code=>"OK", :duration_ms=>196, "x-correlation-id"=>"01K3JEHDCXWC4RT1139C1TJRCD", "x-request-type"=>"dark-launch"}}
This will allow us to match correlation IDs in the Rails logs to those received by SDS.
References
Enhance SDS request logging (#562514 - closed) • Craig Smith • 18.6
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
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 Craig Smith