Flexible analytics querying with custom selections, filters, and aggregations
QUERY_DATA_SOURCE_USER_DATA
- Autocomplete dataQUERY_DATA_SOURCE_CHAT_DATA
- Chat dataQUERY_DATA_SOURCE_COMMAND_DATA
- Command dataQUERY_DATA_SOURCE_PCW_DATA
- Percent Code Written data{aggregation_function}_{field_name}
(lowercase)QUERY_AGGREGATION_UNSPECIFIED
(default)QUERY_AGGREGATION_COUNT
QUERY_AGGREGATION_SUM
QUERY_AGGREGATION_AVG
QUERY_AGGREGATION_MAX
QUERY_AGGREGATION_MIN
QUERY_FILTER_EQUAL
QUERY_FILTER_NOT_EQUAL
QUERY_FILTER_GREATER_THAN
QUERY_FILTER_LESS_THAN
QUERY_FILTER_GE
(greater than or equal)QUERY_FILTER_LE
(less than or equal)Field Name | Description | Valid Aggregations |
---|---|---|
api_key | Hash of user API key | UNSPECIFIED, COUNT |
date | UTC date of autocompletion | UNSPECIFIED, COUNT |
date UTC-x | Date with timezone offset (e.g., “date UTC-8” for PST) | UNSPECIFIED, COUNT |
hour | UTC hour of autocompletion | UNSPECIFIED, COUNT |
language | Programming language | UNSPECIFIED, COUNT |
ide | IDE being used | UNSPECIFIED, COUNT |
version | Windsurf version | UNSPECIFIED, COUNT |
num_acceptances | Number of autocomplete acceptances | SUM, MAX, MIN, AVG |
num_lines_accepted | Lines of code accepted | SUM, MAX, MIN, AVG |
num_bytes_accepted | Bytes accepted | SUM, MAX, MIN, AVG |
distinct_users | Distinct users | UNSPECIFIED, COUNT |
distinct_developer_days | Distinct (user, day) tuples | UNSPECIFIED, COUNT |
distinct_developer_hours | Distinct (user, hour) tuples | UNSPECIFIED, COUNT |
Field Name | Description | Valid Aggregations |
---|---|---|
api_key | Hash of user API key | UNSPECIFIED, COUNT |
model_id | Chat model ID | UNSPECIFIED, COUNT |
date | UTC date of chat response | UNSPECIFIED, COUNT |
date UTC-x | Date with timezone offset | UNSPECIFIED, COUNT |
ide | IDE being used | UNSPECIFIED, COUNT |
version | Windsurf version | UNSPECIFIED, COUNT |
latest_intent_type | Chat intent type (see Intent Types below) | UNSPECIFIED, COUNT |
num_chats_received | Number of chat messages received | SUM, MAX, MIN, AVG |
chat_accepted | Whether chat was accepted (thumbs up) | SUM, COUNT |
chat_inserted_at_cursor | Whether “Insert” button was clicked | SUM, COUNT |
chat_applied | Whether “Apply Diff” button was clicked | SUM, COUNT |
chat_loc_used | Lines of code used from chat | SUM, MAX, MIN, AVG |
CHAT_INTENT_GENERIC
- Regular chatCHAT_INTENT_FUNCTION_EXPLAIN
- Function explanation code lensCHAT_INTENT_FUNCTION_DOCSTRING
- Function docstring code lensCHAT_INTENT_FUNCTION_REFACTOR
- Function refactor code lensCHAT_INTENT_CODE_BLOCK_EXPLAIN
- Code block explanation code lensCHAT_INTENT_CODE_BLOCK_REFACTOR
- Code block refactor code lensCHAT_INTENT_PROBLEM_EXPLAIN
- Problem explanation code lensCHAT_INTENT_FUNCTION_UNIT_TESTS
- Function unit tests code lensaccepted
field to filter for accepted commands only.
Field Name | Description | Valid Aggregations |
---|---|---|
api_key | Hash of user API key | UNSPECIFIED, COUNT |
date | UTC date of command | UNSPECIFIED, COUNT |
timestamp | UTC timestamp of command | UNSPECIFIED, COUNT |
language | Programming language | UNSPECIFIED, COUNT |
ide | IDE being used | UNSPECIFIED, COUNT |
version | Windsurf version | UNSPECIFIED, COUNT |
command_source | Command trigger source (see Command Sources below) | UNSPECIFIED, COUNT |
provider_source | Generation or edit mode | UNSPECIFIED, COUNT |
lines_added | Lines of code added | SUM, MAX, MIN, AVG |
lines_removed | Lines of code removed | SUM, MAX, MIN, AVG |
bytes_added | Bytes added | SUM, MAX, MIN, AVG |
bytes_removed | Bytes removed | SUM, MAX, MIN, AVG |
selection_lines | Lines selected (zero for generations) | SUM, MAX, MIN, AVG |
selection_bytes | Bytes selected (zero for generations) | SUM, MAX, MIN, AVG |
accepted | Whether command was accepted | SUM, COUNT |
COMMAND_REQUEST_SOURCE_LINE_HINT_CODE_LENS
COMMAND_REQUEST_SOURCE_DEFAULT
- Typical command usageCOMMAND_REQUEST_SOURCE_RIGHT_CLICK_REFACTOR
COMMAND_REQUEST_SOURCE_FUNCTION_CODE_LENS
COMMAND_REQUEST_SOURCE_FOLLOWUP
COMMAND_REQUEST_SOURCE_CLASS_CODE_LENS
COMMAND_REQUEST_SOURCE_PLAN
COMMAND_REQUEST_SOURCE_SELECTION_HINT_CODE_LENS
PROVIDER_SOURCE_COMMAND_GENERATE
- Generation modePROVIDER_SOURCE_COMMAND_EDIT
- Edit modeField Name | Description | Valid Aggregations |
---|---|---|
percent_code_written | Calculated as windsurf_bytes / (windsurf_bytes + user_bytes) | UNSPECIFIED |
windsurf_bytes | Total Windsurf-generated bytes | UNSPECIFIED |
user_bytes | Total user-written bytes | UNSPECIFIED |
total_bytes | windsurf_bytes + user_bytes | UNSPECIFIED |
windsurf_bytes_by_autocomplete | Windsurf bytes from autocomplete | UNSPECIFIED |
windsurf_bytes_by_command | Windsurf bytes from command | UNSPECIFIED |
Field Name | Description | Examples |
---|---|---|
api_key | Hash of user API key | |
email | User email address | user@example.com |
language | Programming language | KOTLIN, GO, JAVA |
ide | IDE being used | jetbrains, vscode |
version | Windsurf version | 1.28.0, 130.0 |
start_timestamp
and end_timestamp
in the main request body.