Field Name | Description | Valid Aggregations |
---|---|---|
api_key | A hash of the user API key. | UNSPECIFIED, COUNT |
date | The UTC date of the autocompletion(s). | UNSPECIFIED, COUNT |
date UTC-x | The date of the autocompletion, with a time zone offset. For example, PST would be “date UTC-8”. | UNSPECIFIED, COUNT |
hour | The UTC hour of the autocompletions(s). | UNSPECIFIED, COUNT |
language | The programming language being used. | UNSPECIFIED, COUNT |
ide | The IDE that was being used. | UNSPECIFIED, COUNT |
version | The Windsurf version used | UNSPECIFIED, COUNT |
num_acceptances | The number of times the user accepted an autocomplete. This occurs when the user writes some code, sees grey text, and presses tab. | SUM, MAX, MIN, AVG |
num_lines_accepted | Lines of code accepted from autocomplete. | SUM, MAX, MIN, AVG |
num_bytes_accepted | Bytes accepted from autocomplete. | SUM, MAX, MIN, AVG |
distinct_users | Distinct users. | UNSPECIFIED, COUNT |
distinct_developer_days | Distinct (users, day) tuples. | UNSPECIFIED, COUNT |
distinct_developer_hours | Distinct (users, hour of day) tuples. | UNSPECIFIED, COUNT |
Field Name | Description | Valid Aggregations |
---|---|---|
api_key | A hash of the user API key | UNSPECIFIED, COUNT |
model_id | The chat model’s ID, set during deployment time. | UNSPECIFIED, COUNT |
date | The UTC date of the chat response. | UNSPECIFIED, COUNT |
date UTC-x | The date of the chat response, with a time zone offset. For example, PST would be “date UTC-8”. | UNSPECIFIED, COUNT |
ide | The IDE that was being used | UNSPECIFIED, COUNT |
version | The Windsurf version used | UNSPECIFIED, COUNT |
latest_intent_type | Whether the model response is generated from a code lens or a regular chat. Regular chats will correspond to: CHAT_INTENT_GENERIC while code lenses will correspond to one of: CHAT_INTENT_FUNCTION_EXPLAIN CHAT_INTENT_FUNCTION_DOCSTRING CHAT_INTENT_FUNCTION_REFACTOR CHAT_INTENT_CODE_BLOCK_EXPLAIN CHAT_INTENT_CODE_BLOCK_REFACTOR CHAT_INTENT_PROBLEM_EXPLAIN CHAT_INTENT_FUNCTION_UNIT_TESTS | UNSPECIFIED, COUNT |
num_chats_received | Number of chats messages sent from Windsurf to the user. | SUM, MAX, MIN, AVG |
chat_accepted | True if a code block was sent in Windsurf’s chat response, and the Thumbs up button is clicked. | SUM, COUNT |
chat_inserted_at_cursor | True if a code block was sent in Windsurf’s chat response, and the “Insert” button is clicked. | SUM, COUNT |
chat_applied | True if a code block was sent in Windsurf’s chat response, and the “Apply Diff” button is clicked. | SUM, COUNT |
chat_loc_used | Lines of code used, if a code block was sent in Windsurf’s chat, and any of the “Insert”, “Copy”, or “Apply Diff” buttons are pressed. | SUM, MAX, MIN, AVG |
Field Name | Description | Valid Aggregations |
---|---|---|
api_key | A hash of the user API key. | UNSPECIFIED, COUNT |
date | The UTC date of the command. | UNSPECIFIED, COUNT |
timestamp | The UTC timestamp of the command. | UNSPECIFIED, COUNT |
language | The programming language being used. | UNSPECIFIED, COUNT |
ide | The IDE that was being used. | UNSPECIFIED, COUNT |
version | The Windsurf version used | UNSPECIFIED, COUNT |
command_source | The reason that the command was triggered. Valid values are, COMMAND_REQUEST_SOURCE_LINE_HINT_CODE_LENS COMMAND_REQUEST_SOURCE_DEFAULT COMMAND_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 COMMAND_REQUEST_SOURCE_DEFAULT corresponds to the typical command usage. | UNSPECIFIED, COUNT |
provider_source | Determines whether command was triggered in generation or edit mode. Valid values are,PROVIDER_SOURCE_COMMAND_GENERATE PROVIDER_SOURCE_COMMAND_EDIT | UNSPECIFIED, COUNT |
lines_added | Number of lines of code added by the command. | SUM, MAX, MIN, AVG |
lines_removed | Number of lines of code removed by the command. | SUM, MAX, MIN, AVG |
bytes_added | Number of bytes added by the command. | SUM, MAX, MIN, AVG |
bytes_removed | Number of bytes removed by the command. | SUM, MAX, MIN, AVG |
selection_lines | Number of lines of code selected by the command. Should always be zero for generations. | SUM, MAX, MIN, AVG |
selection_bytes | Number of bytes selected by the command. Should always be zero for generations. | SUM, MAX, MIN, AVG |
accepted | Whether the command was accepted. | SUM, COUNT |
Field Name | Description | Valid Aggregations |
---|---|---|
percent_code_written | Percent code written. Calculated as (number of windsurf bytes generated) / (number of windsurf bytes generated + number of user bytes generated). This metric can have high variance within single days or users, so we recommend aggregating over weeks for this. | UNSPECIFIED |
windsurf_bytes | total number of windsurf bytes, which is equal to windsurf_bytes_by_autocomplete + windsurf_bytes_by_command | UNSPECIFIED |
user_bytes | total number of user bytes | UNSPECIFIED |
total_bytes | windsurf_bytes + user_bytes | UNSPECIFIED |
windsurf_bytes_by_autocomplete | total number of windsurf bytes generated from autocomplete | UNSPECIFIED |
windsurf_bytes_by_command | total number of windsurf bytes generated from command | UNSPECIFIED |
Field Name | Description | Some Examples |
api_key | A hash of the user API key. | |
language | The programming language being used. | KOTLIN, GO, JAVA |
ide | The IDE that was being used. | jetbrains, vscode |
version | The Windsurf version used | 1.28.0, 130.0 |
Error Message | Explanation |
---|---|
at least one field or aggregation is required | Did not detect any selections or aggregations - make sure the query request contains at least one. |
invalid aggregation function for string type field ide: QUERY_AGGREGATION_SUM | One of the selections used an invalid aggregation function. In this case we tried to use SUM on the “ide” field, but it only supports COUNT and UNSPECIFIED |
invalid query table: QUERY_DATA_SOURCE_UNSPECIFIED | There is likely a typo in the data_source field, double check the spelling. |
all selection fields should have an aggregation function, or none of them should | If there are multiple selection fields, either all should contain an aggregation_function, or none of them should. For example, this selection is invalid because num_acceptances is summed, but num_lines_accepted is not: |
invalid aggregation function for string type field ide: QUERY_AGGREGATION_SUM | Not every field supports every aggregation function; see the available fields section for the matches. In this case, the query used a QUERY_AGGREGATION_SUM aggregation function with the “ide” field, which is invalid. |
tried to aggregate on a distinct field: distinct_developer_days. Consider aggregating on the non-distinct fields instead: [api_key date] | Fields with the pattern “distinct_*” can not be in the aggregations section; the error suggests an alternative field(s) to aggregate on instead. So instead of: |
duplicate field alias for selection/aggregation: num_acceptances | All selections and aggregations must have a different name. Keep in mind that if the name is not specified, by default it is set to <AGGREGATION_FUNCTION>_<FIELD_NAME>. |
invalid group name: GroupName | The group with the specified name was not found, double check the spelling. |