Set User Agent to grpc workflow client in workhorse
What does this MR do and why?
This MR adds User Agent header to DAP client in workhorse. This allows us to figure out the errors by the application client in DWS dashboard.
Related to https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/issues/1393+ and Add metadata to metrics and events (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist#1571).
References
DWS log (Web UI)::
{
"event": "Finished ExecuteWorkflow RPC",
"logger": "grpc",
"level": "info",
"correlation_id": "01K82J2T0SY5GDH9K7ES8679WE",
"gitlab_global_user_id": "MMwwCtYAHYpnJyB07tz+J1HZ5cYKDB28u0ir4JRm+Gc=",
"workflow_id": "407",
"duration_s": 5.274897960996896,
"request_arrived_at": "2025-10-21T04:57:47.870250+00:00",
"cpu_s": 0.303933357,
"grpc_type": "BIDI_STREAM",
"grpc_service_name": "DuoWorkflow",
"grpc_method_name": "ExecuteWorkflow",
"servicer_context_code": "OK",
"servicer_context_details": "workflow execution success: require_input",
"gitlab_host_name": "gdk.test",
"gitlab_realm": "saas",
"gitlab_instance_id": "f6f95e20-e282-411f-9fb8-81ddf33b35a2",
"gitlab_authentication_type": "oidc",
"gitlab_version": "18.6.0",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 gitlab-workhorse/11-10-0cfa69752d8-74ffd66ae-ee-362094-g61f18c6c90a2 grpc-go/1.73.0",
"workflow_definition": "chat",
"timestamp": "2025-10-21T04:57:53.145252Z"
}
DWS log (editor extension - websocket):
{
"event": "Finished ExecuteWorkflow RPC",
"logger": "grpc",
"level": "info",
"correlation_id": "01K82HSYVFTZQZ8QG53Q0KX613",
"gitlab_global_user_id": "MMwwCtYAHYpnJyB07tz+J1HZ5cYKDB28u0ir4JRm+Gc=",
"workflow_id": "426",
"duration_s": 4.794210850002855,
"request_arrived_at": "2025-10-21T04:52:57.786354+00:00",
"cpu_s": 0.41881001399999906,
"grpc_type": "BIDI_STREAM",
"grpc_service_name": "DuoWorkflow",
"grpc_method_name": "ExecuteWorkflow",
"servicer_context_code": "OK",
"servicer_context_details": "workflow execution success: require_input",
"gitlab_host_name": "gdk.test",
"gitlab_realm": "saas",
"gitlab_instance_id": "f6f95e20-e282-411f-9fb8-81ddf33b35a2",
"gitlab_authentication_type": "oidc",
"gitlab_version": "18.6.0",
"user_agent": "visual-studio-code/1.105.1 gitlab-workflow/6.49.11 gitlab-language-server/8.24.0 gitlab-workhorse/11-10-0cfa69752d8-74ffd66ae-ee-362094-g61f18c6c90a2 grpc-go/1.73.0",
"workflow_definition": "chat",
"timestamp": "2025-10-21T04:53:02.580623Z"
}
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 Shinya Maeda