You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/analytics/index.mdx
+54-7Lines changed: 54 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,12 @@ This solution is available to:
7
7
-[Sourcegraph Cloud](/cloud) customers
8
8
- Self-hosted customers that have fully enabled usage telemetry, and that are running a supported version of Sourcegraph (5.9+)
9
9
10
+
[Sourcegraph Cloud](/cloud) customers can use our managed [cloud analytics service](https://cody-analytics.sourcegraph.com) for Cody and Code Search usage data.
11
+
Self-hosted customers can also use this service, but they must:
12
+
- Upgrade to a supported version of Sourcegraph (5.9+)
| Percent of code written by Cody | Percentage of code written by Cody out of all code written during the selected time. [Learn more about this metric.](/analytics/pcw)|
31
37
| Lines of code written by Cody | Total lines of code written by Cody during the selected time |
| Authenticated users | All users signed in to Cody in an editor or interacted with Cody on the web during the selected period. [Read more](/admin/pricing#authenticated-users). |
54
60
| Active users | All users who sign in to Cody in an editor or interact with Cody on the web during the period selected. [Read more](/admin/pricing#billable-active-users). |
| Total chat events | Total number of chat interactions with Cody during the selected time |
91
97
| Hours saved by chats | Total hours saved through Cody chat interactions during the selected time , assuming 5 minutes saved per chat |
@@ -101,10 +107,51 @@ Many of the metrics above are also available for Cody only. However, some user d
101
107
102
108
_As of Sourcegraph version 5.10, commands are being deprecated in favor of our new feature, chat prompts. As a result, if your Sourcegraph instance is running version 5.10 or later, you may see decreased command usage. In the coming weeks, these command metrics will be deprecated and replaced with new prompt metrics on the Chats tab._
| Most used commands | Ranking of most frequently used Cody commands during the selected time |
117
+
118
+
### CSV export
119
+
120
+
You can download underlying user activity data from Sourcegraph Analytics as a CSV export. To do this, click the `Export user-level data` button at the top right of any tab within the portal.
121
+
122
+
When exporting, you can group the data by:
123
+
124
+
- User
125
+
- User and month
126
+
- User and day
127
+
- User, day, client, and language
128
+
129
+
Each row in the CSV represents a user's activity for a specific combination of these groupings (e.g., a particular day, month, client, and/or language). The CSV includes metrics such as searches, code navigation actions, chat conversations, code completions, and more.
130
+
131
+
#### Important Notes
132
+
133
+
- Not all billable actions are included: Some Sourcegraph features, such as code monitors and batch changes, are not yet represented as columns in the CSV export. We plan to add these fields soon. If a user engages with these features, their activity may appear as a “blank” row in the export. If a user is listed as an “Active Sourcegraph User” (see column D), but the rest of the row is blank, they performed a billable action that isn’t currently tracked in the CSV
134
+
- A zero or blank value in a row can also mean that the user did not perform tracked actions for that specific date, client, or language
| Instance user ID | Unique identifier assigned to each user in the system. |
139
+
| User Email | Email address associated with the user's account. For self-hosted instances, customer must sign the user metadata export addendum for this column to populate. |
140
+
| Username | User's login identifier, usually matches the username from the auth provider (e.g., GitHub). For self-hosted instances, customer must sign the user metadata export addendum for this column to populate. |
141
+
| Active Sourcegraph User | Indicates if the user activity in this row is considered billable. [Read more](/admin/pricing#billable-active-users)|
142
+
| Client Name | Name of the client application or interface used. Common values: <br /> - `[IDE_name].cody`: Cody extension interactions from IDEs. <br /> - `server.web`: Interactions with the web interface (e.g., searches, code navigation, insights, and some chat events). Variations like `server.svelte-web` may exist. |
143
+
| Timestamp Date (or Month) | When the activity was recorded. |
144
+
| Language | Programming language of the interaction. This is only recorded for a subset of events, mostly completion and code navigation, and will therefore be blank for many rows. |
145
+
| Searches | Number of search queries performed by the user in the web UI. Searches via other methods (e.g., API) are not captured here. |
146
+
| Code Navigation Events | Number of times the user navigated through code structures (e.g., "find references", "go to definition"). |
147
+
| Code Insight Views | Number of times a code insight was viewed. |
148
+
| Chat Events | Number of Cody chats executed. |
149
+
| Command Events | Number of Cody commands executed. |
150
+
| Combined Completion Suggestions | Number of code completion suggestions offered. |
151
+
| Combined Completion Acceptances | Number of code completions accepted by the user. |
152
+
| Total Accepted Char Count | Sum of characters from the user’s accepted code completions (includes both full and partial acceptances). |
153
+
| Combined CAR | Completion acceptance rate (ratio of accepted to suggested completions), combined across editors. |
154
+
| Weighted CAR | Similar to CAR, but weighted by the number of characters presented in the completion. Gives more weight to accepted completions with more code. |
155
+
| Total Characters Written by Cody | Inserted code that Cody generates via chat, prompt responses, accepted autocompletions, or suggestions/fixes. Used as the numerator in the "Percentage of Code Written by Cody" ratio. |
156
+
| Total Characters Written | Total new code inserted into the editor (includes both user-generated and Cody-generated characters). Used as the denominator in the "Percentage of Code Written by Cody" ratio. |
157
+
| Percentage of Code Written by Cody | Measures Cody's impact: (Total Characters Written by Cody ÷ Total Characters Written) × 100. [Learn more about this metric.](/analytics/pcw)|
0 commit comments