Skip to content

Set application name and version in user agent header

What does this MR do and why?

This MR sets the User-Agent header to identify the client software and version making a request to the DWS server.

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).

Related issues

Screenshots or screen recordings

DWS log:

{
    "event": "Finished ExecuteWorkflow RPC",
    "logger": "grpc",
    "level": "info",
    "correlation_id": "01K8524JYJ37H1MN7HXC8X6MWK",
    "gitlab_global_user_id": "",
    "workflow_id": "1",
    "duration_s": 0.007007982001596247,
    "request_arrived_at": "2025-10-22T04:16:51.506021+00:00",
    "cpu_s": 0.0032622890000002513,
    "grpc_type": "BIDI_STREAM",
    "grpc_service_name": "DuoWorkflow",
    "grpc_method_name": "ExecuteWorkflow",
    "servicer_context_code": "INTERNAL",
    "servicer_context_details": "workflow execution failure: ToolException: HTTP action error: unexpected status code: 502",
    "gitlab_host_name": null,
    "gitlab_realm": "",
    "gitlab_instance_id": "",
    "gitlab_authentication_type": "oidc",
    "gitlab_version": "",
    "user_agent": "duo-workflow-executor/0.0.1 grpc-go/1.71.0",
    "workflow_definition": "",
    "timestamp": "2025-10-22T04:16:51.513151Z"
}

Example command:

export DUO_WORKFLOW_SERVICE_SERVER="gdk.test:50052"
export DUO_WORKFLOW_SERVICE_TOKEN="dummy"
export DUO_WORKFLOW_WORKFLOW_ID="1"
export DUO_WORKFLOW_INSECURE="true"
export GITLAB_BASE_URL="http://gdk.test:3000"
export DUO_WORKFLOW_GOAL="test"
export DUO_WORKFLOW_DEBUG="true"
export GITLAB_OAUTH_TOKEN="[REDACTED]"
export GLAB_VERSION="0.0.1"
make build && ./bin/duo-workflow-executor

How to set up and validate locally

Edited by Shinya Maeda

Merge request reports

Loading