Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sourcegraph Docs

<!-- Working branch for Dec 2024 Release -->
<!-- Working branch for JAN 2025 Release -->

Welcome to the Sourcegraph documentation! We're excited to have you contribute to our docs. We've recently rearchitectured our docs tech stack — powered by Next.js, TailwindCSS and deployed on Vercel. This guide will walk you through the process of contributing to our documentation using the new tech stack.

Expand Down
4 changes: 2 additions & 2 deletions dev/rss.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const generateRssFeed = () => {
id: siteURL,
link: baseURL,
language: 'en',
image: `${siteURL}/favicon.png`,
favicon: `${siteURL}/favicon.ico`,
image: `${siteURL}/sourcegraph-mark.png`,
favicon: `${siteURL}/sourcegraph-mark.png`,
copyright: `All rights reserved ${date.getFullYear()}, Sourcegraph`,
updated: date,
generator: 'Sourcegraph RSS Feed',
Expand Down
2 changes: 1 addition & 1 deletion docs.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const config = {
DOCS_LATEST_VERSION: '5.11'
DOCS_LATEST_VERSION: '6.0'
};

module.exports = config;
2 changes: 1 addition & 1 deletion docs/admin/pricing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ A billable active Code Search or Code Intelligence Platform user is one who is s

A user who has accessed a Sourcegraph product is counted as active once they complete an action that represents usage reflected above.

User counts can be found in the **Site admin** section of the Sourcegraph web application, and Cody-specific usage metrics can be found in the [Cody Analytics service](../cody/clients/enable-cody-enterprise#analytics).
User counts and more usage metrics can be found in [Sourcegraph Analytics](../analytics).
18 changes: 18 additions & 0 deletions docs/analytics/cloud.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Sourcegraph Cloud Analytics

The following instructions are for all Sourcegraph Cloud and self-hosted customers who have upgraded to a sufficient version of Sourcegraph (5.9+) and fully enabled usage telemetry. Customers that self-host can also view our [self-hosted analytics enablement](/self-hosted).

![Sourcegraph-cloud-analytics](https://storage.googleapis.com/sourcegraph-assets/cloud-analytics.png)

## Enablement instructions

To enable Sourcegraph Analytics:

- Create an account on [Sourcegraph Accounts](https://accounts.sourcegraph.com/), or find the email address associated with your existing account.
- Contact your Sourcegraph Technical Advisor or point of contact (or email us at [email protected] if you don't know your contact), provide them with the email address you used to register above and ask for access to Sourcegraph Analytics.
- They will validate your account and link it to your Sourcegraph Enterprise instance's usage metrics.
- Sign in to [Sourcegraph Analytics](https://cody-analytics.sourcegraph.com).

## Data export

Sourcegraph Cloud Analytics also includes a CSV export option with key metrics like the number of searches, chats, autocomplete suggestions, completion acceptance rate (CAR %), and more. The data is split by user, day, client/editor, and programming language, perfect for automating retrieval and analyzing data in ways that make the most sense to your organization.
101 changes: 101 additions & 0 deletions docs/analytics/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Sourcegraph Analytics

Enterprise customers can use Sourcegraph Analytics to get a clear view of usage, engagement, performance, and impact.

## Sourcegraph Cloud Analytics

[Sourcegraph Cloud](/cloud) customers can use our managed [cloud analytics service](https://cody-analytics.sourcegraph.com) for Cody and Code Search usage data.
Self-hosted customers can also use this service, but they must

Upgrade to a supported version of Sourcegraph (5.9+)
Have fully enabled usage telemetry.
- [Enablement instructions](/analytics/cloud#enablement)

![Sourcegraph-cloud-analytics](https://storage.googleapis.com/sourcegraph-assets/Docs/Sourcegraph-Analytics-2025-01-28.png)

## Self-Hosted Analytics

Self-hosted customers will soon be able to use our self-hosted and locally deployed analytics service, built on Grafana, to see Sourcegraph usage data.

This product is in development now. If you would like to learn more, please contact your Sourcegraph representative.

## Metrics

We provide a set of metrics that can be used to monitor Sourcegraph usage, engagement, performance, and impact within your enterprise.

Learn more about how we think about [the ROI of Sourcegraph in our blog](https://sourcegraph.com/blog/measuring-the-impact-of-ai-coding-tools).

### User metrics available

| Metric | Description |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| Total active users | Total number of unique users who have used any Sourcegraph product during the selected time |
| Average daily users | The average number of unique users who use Sourcegraph per day during the selected time |
| Average days of activity per user | The average number of days each user actively uses Sourcegraph during the selected time |
| Daily active users | Number of unique users who used Sourcegraph by day |
| Weekly active users | Number of unique users who used Sourcegraph by week |
| Daily users by product | Count of daily users across different Sourcegraph products (Cody, Code Search, Code Insights, etc.) |
| Product usage distribution (by percentage of users) | Percentage breakdown of users across different Sourcegraph product groupings during the selected time |
| Detailed user activity (top 20 users) | List of the 20 most active users during the selected time and their usage patterns |
| Frequency of usage | Count of users who used Sourcegraph _n_ times over the past 30 days |

Cody-only user metrics

Many of the metrics above are also available for Cody only. However, some user definitions are slightly different:

| User category | Description |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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). |
| 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). |

### Code Search & navigation metrics

| Metric | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| Total in-product searchers | Number of unique users who performed searches using the Sourcegraph search interface during the selected time |
| Total result clicks | Count of times users clicked on search results to view files or other resources during the selected time |
| Total file views | Number of times users viewed individual files through Sourcegraph during the selected time |
| Daily in-product search activity | Count of search operations performed each day through the Sourcegraph interface |
| Daily search users (in-product and API) | Number of unique users performing searches each day, including both UI and API usage |
| All searches (in-product and API) by type | Breakdown of searches by category (e.g., literal, regex), including both UI and API usage |
| Total code navigation actions | Count of all code navigation operations performed (e.g., go-to-definition, find references) during the selected time period |
| Precise code navigation % | Percentage of code navigation actions that used precise intelligence rather than search-based results during the selected time |
| Daily code navigation activity | Count of code navigation operations performed each day |
| Daily code navigation users | Number of unique users utilizing code navigation features each day |
| Precise vs. search-based code navigation actions by language | Comparison of precise vs. search-based navigation success rates broken down by programming language |

### Autocompletion metrics

| Metric | Description |
| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Total accepted completions | Count of completions accepted by users during the selected time |
| Hours saved | The number of hours saved by Cody users, assuming 2 minutes saved per completion |
| Completions by day | The number of completions suggested by day and by editor. |
| Completion acceptance rate (CAR) | The percent of completions presented to a user for at least 750ms accepted by day, the editor, day, and month. |
| Weighted completion acceptance rate (wCAR) | Similar to CAR, but weighted by the number of characters presented in the completion, and only counting those fully retained by the user for X minutes after accepting the completion, by the editor, day, and month. |
| Average completion latency (ms) | The average milliseconds of latency before a user is presented with a completion suggestion by an editor. |
| Acceptance rate by language | CAR and total completion suggestions broken down by editor during the selected time |

### Chat and prompt metrics

| Metric | Description |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| Total chat events | Total number of chat interactions with Cody during the selected time |
| Minutes saved per chat | Average time saved per chat interaction with Cody during the selected time |
| Hours saved by chats | Total hours saved through Cody chat interactions during the selected time , assuming 5 minutes saved per chat |
| Cody chats by day | Daily count of chat interactions |
| Cody chat users | Daily count of chat users |
| Prompts created, edited, and deleted by day | Daily count of prompt management activities, including creation, modification, and removal |
| Users creating, editing, and deleting prompts by day | Number of unique users performing prompt management activities each day |

### Command metrics (deprecated)

_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._

| Metric | Description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------- |
| Total command events | Total number of command executions during the selected time |
| Hours saved by commands | Total hours saved through command executions during the selected time, assuming 5 minutes saved per command |
| Cody commands by day | Daily count of command executions |
| Cody command users | Daily count of command users |
| Most used commands | Ranking of most frequently used Cody commands during the selected time |
19 changes: 19 additions & 0 deletions docs/analytics/self-hosted.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Sourcegraph Self-Hosted Analytics

<Callout type="note">This feature is not yet available. Coming soon.</Callout>

Sourcegraph Self-Hosted Analytics is coming soon! Self-hosted customers can view usage metrics in a locally deployed analytics service built on Grafana.

This product is in development now. If you would like to learn more, please contact your Sourcegraph representative.

## Set-up instructions

Coming soon.

## Updates

Coming soon.

## Custom metrics

Coming soon.
7 changes: 7 additions & 0 deletions docs/batch-changes/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Batch Changes

<TierCallout>
Supported on [Enterprise](/pricing/enterprise) plans.
<user>
Currently available via the Web app.
</user>
</TierCallout>

<p className="subtitle">This section is about Batch Changes, which helps you automate and ship large-scale code changes across many repositories and code hosts.</p>

Batch Changes helps you ship large-scale code changes across many repositories and code hosts. You can create pull requests on all affected repositories, and it tracks their progress until they're all merged. You can also preview the changes and update them at any time.
Expand Down
9 changes: 7 additions & 2 deletions docs/code-search/code-navigation/auto_indexing.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Auto-indexing

<p className="subtitle">Learn and understand how auto-indexing works.</p>
<TierCallout>
Supported on [Enterprise](/pricing/enterprise) plans.
<user>
Currently in Beta and available via Web app.
</user>
</TierCallout>

<Callout type="note">Auto-indexing is currently in Beta stage.</Callout>
<p className="subtitle">Learn and understand how auto-indexing works.</p>

With Sourcegraph deployments supporting [executors](/admin/executors/), your repository contents can be automatically analyzed to produce a code graph index file. Once [auto-indexing is enabled](/code-search/code-navigation/auto_indexing#enable-auto-indexing) and [auto-indexing policies are configured](/code-search/code-navigation/auto_indexing#configure-auto-indexing), repositories will be periodically cloned into an executor sandbox, analyzed, and the resulting index file will be uploaded back to the Sourcegraph instance.

Expand Down
7 changes: 7 additions & 0 deletions docs/code-search/code-navigation/precise_code_navigation.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Precise Code Navigation

<TierCallout>
Supported on [Enterprise](/pricing/enterprise) plans.
<user>
Available via the Web app.
</user>
</TierCallout>

<p className="subtitle">Learn and understand about Precise Code Navigation.</p>

Precise Code Navigation is an opt-in feature that is enabled from your admin settings and requires you to upload indexes for each repository to your Sourcegraph instance. Once setup is complete on Sourcegraph, precise code navigation is available for use across popular development tools:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Search-based Code Navigation

<TierCallout>
Supported on [Enterprise](/pricing/enterprise) plans.
<user>
Available via VS Code and JetBrains editor extensions and the Web.
</user>
</TierCallout>

<p className="subtitle">Learn and understand about Search-based Code Navigation.</p>

Sourcegraph comes with a default built-in code navigation provided by search-based heuristics. It works out of the box with all of the most popular programming languages.
Expand Down Expand Up @@ -42,5 +49,5 @@ The default values for these environment variables come from [`config.go`](https
## More resources

<LinkCards>
<LinkCard href="/code-search/code-navigation/rockskip" imgSrc="https://sourcegraph.com/.assets/img/sourcegraph-mark.svg" imgAlt="Rockskip" title="Rockskip: Symbol sidebar and search navigation" description="Enhances symbol sidebar and search-based code navigation experience in large monorepos." />
<LinkCard href="/code-search/code-navigation/rockskip" imgSrc="https://storage.googleapis.com/sourcegraph-assets/Docs/sg-new-logo.svg" imgAlt="Rockskip" title="Rockskip: Symbol sidebar and search navigation" description="Enhances symbol sidebar and search-based code navigation experience in large monorepos." />
</LinkCards>
2 changes: 1 addition & 1 deletion docs/code-search/features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p className="subtitle">Learn and understand more about Sourcegraph's Code Search features and core functionality.</p>

<LinkCards>
<LinkCard href="https://about.sourcegraph.com/get-started?t=enterprise" imgSrc="https://sourcegraph.com/.assets/img/sourcegraph-mark.svg" imgAlt="Sourcegraph" title="Get single-tenant instance managed by Sourcegraph." description="Sign up and get a 30 day free trial for your team." />
<LinkCard href="https://about.sourcegraph.com/get-started?t=enterprise" imgSrc="https://storage.googleapis.com/sourcegraph-assets/Docs/sg-new-logo.svg" imgAlt="Sourcegraph" title="Get single-tenant instance managed by Sourcegraph." description="Sign up and get a 30 day free trial for your team." />
</LinkCards>

## Powerful, flexible queries
Expand Down
Loading