Skip to content

Commit 368a28b

Browse files
committed
analytics dashboard
1 parent 69fbf9b commit 368a28b

File tree

25 files changed

+903
-272
lines changed

25 files changed

+903
-272
lines changed

docs/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
]
3737
},
3838
"docs/features/code-navigation",
39+
"docs/features/analytics",
3940
"docs/features/mcp-server",
4041
{
4142
"group": "Agents",

docs/docs/configuration/audit-logs.mdx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ curl --request GET '$SOURCEBOT_URL/api/ee/audit' \
4040
{
4141
"id": "cmc146c8r0001xgo2xyu0p463",
4242
"timestamp": "2025-06-17T22:47:58.587Z",
43-
"action": "query.code_search",
43+
"action": "user.performed_code_search",
4444
"actorId": "cmc12tnje0000xgn58jj8655h",
4545
"actorType": "user",
4646
"targetId": "1",
@@ -54,7 +54,7 @@ curl --request GET '$SOURCEBOT_URL/api/ee/audit' \
5454
{
5555
"id": "cmc12vqgb0008xgn5nv5hl9y5",
5656
"timestamp": "2025-06-17T22:11:44.171Z",
57-
"action": "query.code_search",
57+
"action": "user.performed_code_search",
5858
"actorId": "cmc12tnje0000xgn58jj8655h",
5959
"actorType": "user",
6060
"targetId": "1",
@@ -68,7 +68,7 @@ curl --request GET '$SOURCEBOT_URL/api/ee/audit' \
6868
{
6969
"id": "cmc12txwn0006xgn51ow1odid",
7070
"timestamp": "2025-06-17T22:10:20.519Z",
71-
"action": "query.code_search",
71+
"action": "user.performed_code_search",
7272
"actorId": "cmc12tnje0000xgn58jj8655h",
7373
"actorType": "user",
7474
"targetId": "1",
@@ -117,8 +117,8 @@ curl --request GET '$SOURCEBOT_URL/api/ee/audit' \
117117
| `user.creation_failed` | `user` | `user` |
118118
| `user.owner_created` | `user` | `org` |
119119
| `user.performed_code_search` | `user` | `org` |
120-
| `user.performed_code_nav_find_references` | `user` | `org` |
121-
| `user.performed_code_nav_goto_definition` | `user` | `org` |
120+
| `user.performed_find_references` | `user` | `org` |
121+
| `user.performed_goto_definition` | `user` | `org` |
122122
| `user.jit_provisioning_failed` | `user` | `org` |
123123
| `user.jit_provisioned` | `user` | `org` |
124124
| `user.join_request_creation_failed` | `user` | `org` |
@@ -134,9 +134,6 @@ curl --request GET '$SOURCEBOT_URL/api/ee/audit' \
134134
| `user.signed_out` | `user` | `user` |
135135
| `org.ownership_transfer_failed` | `user` | `org` |
136136
| `org.ownership_transferred` | `user` | `org` |
137-
| `query.file_source` | `user \| api_key` | `file` |
138-
| `query.code_search` | `user \| api_key` | `org` |
139-
| `query.list_repositories` | `user \| api_key` | `org` |
140137

141138

142139
## Response schema

docs/docs/configuration/environment-variables.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The following environment variables allow you to configure your Sourcebot deploy
3939
### Enterprise Environment Variables
4040
| Variable | Default | Description |
4141
| :------- | :------ | :---------- |
42-
| `SOURCEBOT_EE_AUDIT_LOGGING_ENABLED` | `false` | <p>Enables/disables audit logging</p> |
42+
| `SOURCEBOT_EE_AUDIT_LOGGING_ENABLED` | `true` | <p>Enables/disables audit logging</p> |
4343
| `AUTH_EE_ENABLE_JIT_PROVISIONING` | `false` | <p>Enables/disables just-in-time user provisioning for SSO providers.</p> |
4444
| `AUTH_EE_GITHUB_BASE_URL` | `https://github.com` | <p>The base URL for GitHub Enterprise SSO authentication.</p> |
4545
| `AUTH_EE_GITHUB_CLIENT_ID` | `-` | <p>The client ID for GitHub Enterprise SSO authentication.</p> |

docs/docs/features/analytics.mdx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Analytics
3+
sidebarTitle: Analytics
4+
---
5+
6+
import LicenseKeyRequired from '/snippets/license-key-required.mdx'
7+
import { Callout } from 'nextra/components'
8+
9+
<LicenseKeyRequired />
10+
11+
12+
## Overview
13+
14+
Analytics provides comprehensive insights into your organization's usage of Sourcebot, helping you understand adoption patterns and
15+
quantify the value of time saved.
16+
17+
This dashboard is backed by [audit log](/docs/configuration/audit-logs) events. Please ensure you have audit logging enabled in order to see these insights.
18+
19+
<video
20+
autoPlay
21+
muted
22+
loop
23+
playsInline
24+
className="w-full aspect-video"
25+
src="/images/analytics_demo.mp4"
26+
></video>
27+
28+
## Data Metrics
29+
30+
### Active Users
31+
Tracks the number of unique users who performed any Sourcebot operation within each time period. This metric helps you understand team adoption
32+
and engagement with Sourcebot.
33+
34+
![DAU Chart](/images/dau_chart.png)
35+
36+
### Code Searches
37+
Counts the number of code search operations performed by your team. Code searches include all semantic and syntax-based queries
38+
performed through the search interface.
39+
40+
![Code Search Chart](/images/code_search_chart.png)
41+
42+
### Code Navigation
43+
Tracks "Go to Definition" and "Find All References" navigation actions. Navigation actions help developers quickly move
44+
between code locations and understand code relationships.
45+
46+
![Code Nav Chart](/images/code_nav_chart.png)
47+
48+
## Cost Savings Calculator
49+
50+
The analytics dashboard includes a built-in cost savings calculator that helps you quantify the ROI of using Sourcebot.
51+
52+
![Cost Savings Chart](/images/cost_savings_chart.png)

docs/images/analytics_demo.mp4

6.23 MB
Binary file not shown.

docs/images/code_nav_chart.png

597 KB
Loading

docs/images/code_search_chart.png

612 KB
Loading

docs/images/cost_savings_chart.png

739 KB
Loading

docs/images/dau_chart.png

561 KB
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- CreateIndex
2+
CREATE INDEX "idx_audit_core_actions_full" ON "Audit"("orgId", "timestamp", "action", "actorId");
3+
4+
-- CreateIndex
5+
CREATE INDEX "idx_audit_actor_time_full" ON "Audit"("actorId", "timestamp");

0 commit comments

Comments
 (0)