You need to sign in or sign up before continuing.
MCP Telemetry: Initial Use Cases
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to Solve
Currently we have limited visibility into how users are leveraging the official GitLab MCP server. This issue covers the initial phase of understanding who is using the MCP server, how successfully they're using it, and if they're hitting any adoption blockers.
Proposal
-
Create new event definitions in
config/events/
:start_mcp_tool_call
finish_mcp_tool_call
-
Instrument tracking calls using
Gitlab::Tracking.event
with contextual data:
Event Name | Fields | Description |
---|---|---|
start_mcp_tool_call |
|
Event triggered when the user calls a MCP tool |
finish_mcp_tool_call |
|
Event triggered when the tool call finishes |
- Verify internal event tracking is properly configured and functioning
For reference, the following information is capture for each workflow in DWS
YAML files referenced can be found in ee/config/events/
Field Name | Likely Event(s) / Description | Notes |
---|---|---|
WORKFLOW_ID | (all events) | Used as a reference/foreign key; appears in each event |
SESSION_ID | (all events) | As above |
WORKFLOW_START_DATE | start_duo_workflow_execution.yml | Date of workflow start |
FIRST_TIMESTAMP | start_duo_workflow_execution.yml | First event timestamp |
LAST_TIMESTAMP | finish_duo_workflow_execution.yml | Last event timestamp |
WORKFLOW_DURATION_MINUTES | Calculated from START/FINISH events | duration = finish - start |
ULTIMATE_PARENT_NAMESPACE_ID | (all events, from event context) | Namespace reference |
ULTIMATE_PARENT_NAMESPACE_IDS | (all events, from event context) | Array of namespaces |
NAMESPACE_IS_INTERNAL | (all events, from event context) | Internal flag from namespace |
DIM_INSTALLATION_ID | (all events) | Deployment context |
DIM_INSTANCE_ID | (all events) | Deployment context |
HOST_NAME | (all events) | Host context |
DEPLOYMENT_TYPE | (all events) | Deployment context |
COUNT_NAMESPACES | (all events) | Aggregated per session/workflow |
GSC_IS_GITLAB_TEAM_MEMBER | (all events, user context) | Internal usage flag |
IS_INTERNAL_USAGE_ANY | (Derived from all GitLab internal/team events) | Internal usage flag |
IS_INTERNAL_INSTALLATION | (all events, context) | Internal GitLab instance |
USER_AFFILIATION | (all events, user context) | User account org info |
DIM_CRM_ACCOUNT_ID | (all events, context) | CRM mapping |
DIM_PARENT_CRM_ACCOUNT_ID | (all events, context) | CRM mapping |
CRM_ACCOUNT_NAME | (all events, context) | CRM info |
PARENT_CRM_ACCOUNT_NAME | (all events, context) | CRM info |
ACCOUNT_OWNER | (all events, context) | CRM info |
TECHNICAL_ACCOUNT_MANAGER | (all events, context) | CRM info |
PARENT_CRM_ACCOUNT_REGION | (all events, context) | CRM info |
PARENT_CRM_ACCOUNT_GEO | (all events, context) | CRM info |
PARENT_CRM_ACCOUNT_SALES_SEGMENT | (all events, context) | CRM info |
PARENT_CRM_ACCOUNT_INDUSTRY | (all events, context) | CRM info |
TIER | (all events, context) | Tier, from CRM |
DUO_ADD_ON | (all events, context) | Add-on flags, from context |
COUNT_USERS | (all events, context) | Counted per workflow/session |
DUO_WORKFLOW_REQUEST_CATEGORY | request_duo_chat_response.yml, start_duo_workflow_execution.yml | Request category property |
EVENT_ACTION_ARRAY | All tracked events | Array of event action names for this session/workflow |
IS_CANCELLED | finish_duo_workflow_execution.yml (cancelled) | If status = cancelled |
IS_RESUMED | retry_duo_workflow_execution.yml | If retry/resume event present |
HAS_FLOW_SUCCESS | finish_duo_workflow_execution.yml (success) | If finished successfully |
HAS_FLOW_FAILURE | finish_duo_workflow_execution.yml (failure), error_answer.yml | Failure event or failed finish |
HAS_TOOL_SUCCESS | execute_llm_method.yml, code_suggestion_accepted_in_ide.yml | Tool success (accept, complete, etc.) |
HAS_TOOL_FAILURE | code_suggestion_rejected_in_ide.yml, error_answer.yml | Tool failed/errored |
HAS_FLOW_RESUME | retry_duo_workflow_execution.yml | Resumed event |
HAS_FLOW_PAUSE | (application-specific/pause event if exists) | Uncommon in core events; check for pause-specific custom events |
HAS_FLOW_RETRY | retry_duo_workflow_execution.yml | Retry event |
HAS_FLOW_STOP | finish_duo_workflow_execution.yml | Stop/finalize event |
HAS_TOKEN_USAGE | tokens_per_user_request_prompt.yml, tokens_per_user_request_response.yml | On token usage events |
HAS_FLOW_MESSAGE | finish_duo_workflow_execution.yml, request_duo_chat_response.yml | Message/response present |
WORKFLOW_STATUS | finish_duo_workflow_execution.yml (status enum) | Copy status/result from finish |
FLOW_STATUS | finish_duo_workflow_execution.yml (result) | Detailed state (success/failure etc) |
FINISHED_STATUS | finish_duo_workflow_execution.yml (end state) | Final disposition |
INPUT_TOKENS | tokens_per_user_request_prompt.yml | Accumulate per workflow |
OUTPUT_TOKENS | tokens_per_user_request_response.yml | Accumulate per workflow |
OVERALL_TOKENS | tokens_per_user_request_prompt.yml + tokens_per_user_request_response.yml | Total input + output tokens per workflow |
COUNT_TOOL_SUCCESSES | All tool success events | Count of tool success actions |
COUNT_TOOL_FAILURES | All tool failure events | Count of tool failure actions |
COUNT_RESUME_FLOW | retry_duo_workflow_execution.yml | Resume attempt count |
COUNT_PAUSE_FLOW | (application-specific; rarely used) | Pauses, if implemented |
COUNT_RETRY_FLOW | retry_duo_workflow_execution.yml | Retry attempts count |
COUNT_FLOW_SUCCESSES | finish_duo_workflow_execution.yml (success) | Successful flow finishes |
COUNT_FLOW_FAILURES | finish_duo_workflow_execution.yml (failure) | Failed flow finishes |
COUNT_MESSAGES | request_duo_chat_response.yml, finish_duo_workflow_execution.yml | API responses/messages |
COUNT_FLOW_STOPS | finish_duo_workflow_execution.yml | End/finished counts |
LAST_ACTION | Last event by timestamp | Name of last action in action array |
FIRST_ACTION | First event by timestamp | Name of first action in action array |
TOTAL_UNIQUE_INTERACTIONS | Count of unique user-triggered events | Deduplicated action array for session/workflow |
TOTAL_API_CALLS | Sum of calls: request_duo_chat_response.yml, execute_llm_method.yml | All tied API invocations |
TOKENS_PER_SUCCESSFUL_TOOL | Calculated (tokens/tool success events) | Divide total tokens by tool successes |
TOKENS_PER_MINUTE | Calculated (tokens/duration) | Total tokens per minute |
IS_PRODUCTIVE_WORKFLOW | Derived from business logic/events | Based on defined criteria |
DURATION_CATEGORY | Derived from workflow duration | Duration bucketed or labeled |
FAILURE_REASON | error_answer.yml, finish_duo_workflow_execution.yml (if error) | Error events, failure reason property |
ERROR_STATUS | error_answer.yml, finish_duo_workflow_execution.yml | Status error type, final event error property |
Edited by Martin Wortschack