Skip to content

Commit 84d71b7

Browse files
sarahxsandersPostHog
andauthored
docs: document GitLab source linking (#13851)
* docs: document GitLab source linking * add redirect * remove screenshot from stack-traces.mdx * nit about view commit icon * change icon * move integration descriptions to table, other nits * Fix typos * fix broken build --------- Co-authored-by: PostHog <hey@posthog.com>
1 parent 5cb6e23 commit 84d71b7

7 files changed

Lines changed: 141 additions & 95 deletions

File tree

contents/docs/error-tracking/assigning-issues.mdx

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ title: Assign issues to teammates
44

55
Error tracking enables you to assign issues to specific PostHog [roles](https://app.posthog.com/settings/organization-roles) or teammates. This helps your team find relevant issues through **filtering**. You can also set up team-specific **alerting** to notify them when assigned issues are created or reopened.
66

7-
8-
## Assigning issues
7+
## Assign issues
98

109
You can manually assign issues as you triage them in the UI. This can be done both in the issue list and issue detail pages.
1110

@@ -50,15 +49,15 @@ Here are some common properties you can filter on:
5049

5150
| Property | Event property | Description |
5251
| --- | --- | --- |
53-
| Exception type | `$exception_types` | The type of exception(s) that occurred. |
54-
| Exception message | `$exception_values` | The message(s) detected on the error. |
55-
| Exception function | `$exception_functions` | The function(s) where the exception occurred. |
56-
| Exception source | `$exception_sources` | The source file(s) where the exception occurred. |
57-
| Exception was handled | `$exception_handled` | Whether the exception was handled by the application. |
58-
| Device type | `$device_type` | The type of device that the error occurred on. |
59-
| Browser | `$browser` | The browser that the error occurred in. |
60-
| Current URL | `$current_url` | The URL that the error occurred on. |
61-
| Feature flag | `$feature_flag` | The feature flag that the error occurred on. |
52+
| Exception type | `$exception_types` | The type of exception(s) that occurred |
53+
| Exception message | `$exception_values` | The message(s) detected on the error |
54+
| Exception function | `$exception_functions` | The function(s) where the exception occurred |
55+
| Exception source | `$exception_sources` | The source file(s) where the exception occurred |
56+
| Exception was handled | `$exception_handled` | Whether the exception was handled by the application |
57+
| Device type | `$device_type` | The type of device that the error occurred on |
58+
| Browser | `$browser` | The browser that the error occurred in |
59+
| Current URL | `$current_url` | The URL that the error occurred on |
60+
| Feature flag | `$feature_flag` | The feature flag that the error occurred on |
6261

6362
You can also set custom properties on the error tracking event to filter on. For example, setting a custom `params_received` property to provide more context or debug information.
6463

@@ -68,4 +67,21 @@ Issue assignment filters are evaluated in the order they are configured. They ca
6867

6968
### Alerting based on assignment
7069

71-
A common use case for automatic issue assignment is to alert assignees of new issues. Once the issues are automatically assigned, you can set up alerts to notify the assignee. See the [alerts](/docs/error-tracking/alerts) guide for more information.
70+
A common use case for automatic issue assignment is to alert assignees of new issues. Once the issues are automatically assigned, you can set up alerts to notify the assignee. See the [alerts](/docs/error-tracking/alerts) guide for more information.
71+
72+
## Create external issues
73+
74+
You can also create issues in external tracking systems like GitHub Issues, Linear, or GitLab.
75+
76+
First, set up an [integration](/docs/error-tracking/integrations) with your tracking system. Then, from an issue's details page, under **External references**, click **Create issue**.
77+
78+
<ProductScreenshot
79+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/create_issue_error_light_b89cd91da1.png"
80+
imageDark="https://res.cloudinary.com/dmukukwp6/image/upload/create_issue_error_dark_7d158087f8.png"
81+
alt="Error tracking create issue in external tracking system"
82+
classes="rounded"
83+
/>
84+
85+
The new issue will have a partial stack trace and a link to the issue in PostHog.
86+
87+
> If you use another issue tracking system and would like to request it, [let us know in-app](https://app.posthog.com#panel=support%3Afeedback%3Aerror_tracking%3Alow%3Atrue).

contents/docs/error-tracking/external-tracking.mdx

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Set up integrations
3+
---
4+
5+
PostHog integrates with GitHub, GitLab, and Linear to enhance error tracking with source code context, commit information, and external issue tracking.
6+
7+
| Integration | Capabilities |
8+
|-------------|-----------------|
9+
| [GitHub](#github-integration) | Pinpoint Git commits that cause issues, open files in GitHub directly from stack traces, and create GitHub issues from errors |
10+
| [GitLab](#gitlab-integration) | Pinpoint Git commits that cause issues, open files in GitLab directly from stack traces, and create GitLab issues from errors |
11+
| [Linear](#linear-integration) | Create Linear issues directly from errors and track fixes in your existing Linear workflows |
12+
13+
## GitHub integration
14+
15+
To set up the GitHub integration:
16+
17+
1. Go to [Error tracking settings](https://app.posthog.com/settings/project-error-tracking) in the PostHog app and find **Integrations**
18+
2. Under **GitHub**, click **Connect organization**
19+
3. Authorize PostHog to access your repositories
20+
4. Select the repositories you want to link
21+
22+
PostHog connects to GitHub by installing a GitHub application. PostHog needs the following permissions:
23+
24+
- Read access to metadata
25+
- Read and write access to code, issues, and pull requests
26+
27+
Once connected, create a [release](/docs/error-tracking/releases) to start using source linking.
28+
29+
## GitLab integration
30+
31+
To set up the GitLab integration:
32+
33+
1. Go to [Error tracking settings](https://app.posthog.com/settings/project-error-tracking) in the PostHog app and find **Integrations**
34+
2. Under **GitLab**, click **Connect project**
35+
3. Provide the following information:
36+
- Hostname
37+
- Project ID
38+
- A project access token with the `api` scope
39+
40+
PostHog connects to GitLab using a [project access token](https://docs.gitlab.com/user/project/settings/project_access_tokens).
41+
42+
Once connected, create a [release](/docs/error-tracking/releases) to start using source linking.
43+
44+
## Linear integration
45+
46+
Connect your Linear workspace to create and track Linear issues directly from error tracking.
47+
48+
To set up the Linear integration:
49+
50+
1. Go to [Error tracking settings](https://app.posthog.com/settings/project-error-tracking) in the PostHog app and find **Integrations**
51+
2. Under **Linear**, click **Connect workspace**
52+
3. Authorize PostHog to access your Linear workspace
53+
54+
PostHog connects to Linear using a [third-party app](https://linear.app/docs/third-party-application-approvals). PostHog needs the following permissions:
55+
56+
- Create issues for your workspace
57+
- Read access to your workspace
58+
59+
## What's next?
60+
61+
After setting up an integration:
62+
63+
1. [Upload source maps](/docs/error-tracking/upload-source-maps) for better stack traces
64+
2. [Create releases](/docs/error-tracking/releases) to link errors to specific deployments
65+
3. [Create external issues](/docs/error-tracking/assigning-issues#creating-external-issues) from PostHog

contents/docs/error-tracking/releases.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,16 @@ When you [upload sourcemaps](/docs/error-tracking/upload-source-maps/) using `po
2727

2828
## Release context in error tracking
2929

30-
Other than a specific release version that you define, captured exceptions inherit the release information recorded during injection. PostHog attaches the release, project, and Git metadata to each exception captured as we capture it in our ingestion pipeline.
30+
Other than a specific release version that you define, captured exceptions inherit the release information recorded during injection. PostHog attaches the release, project, and Git metadata to each exception captured as we capture it in our ingestion pipeline.
31+
32+
## Source linking
33+
34+
Releases enable source linking in stack traces. When you create a release with repository information, PostHog can link each stack frame to the exact file and line in your GitHub or GitLab repository.
35+
36+
To use source linking:
37+
38+
1. Set up a [GitHub or GitLab integration](/docs/error-tracking/integrations)
39+
2. Create a release that includes your repository and commit information
40+
3. PostHog automatically adds **View commit** buttons to stack traces
41+
42+
This makes it faster to investigate errors by jumping directly from the stack trace to your source code. Learn more about [stack traces](/docs/error-tracking/stack-traces#source-linking).

contents/docs/error-tracking/stack-traces.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ Error tracking displays release information over stack traces to help you track
4242

4343
Learn more about [releases](/docs/error-tracking/releases/) in error tracking.
4444

45+
## Source linking
46+
47+
When viewing stack traces in PostHog, you can click directly through to the relevant code in your GitHub or GitLab repository. Each stack frame includes a **View commit** button (displayed using a GitHub or GitLab icon) that links to the exact file and line where the error occurred.
48+
49+
<ProductScreenshot
50+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/q_auto,f_auto/Clean_Shot_2025_11_20_at_14_37_09_2x_2ff2e56430.png"
51+
imageDark="https://res.cloudinary.com/dmukukwp6/image/upload/q_auto,f_auto/Clean_Shot_2025_11_20_at_14_37_09_2x_2ff2e56430.png"
52+
alt="Stacktrace with GitLab source link"
53+
classes="rounded"
54+
/>
55+
56+
Source linking requires a [GitHub or GitLab integration](/docs/error-tracking/integrations) and a [release](/docs/error-tracking/releases) with repository information. Once set up, PostHog automatically adds source links to your stack traces.
57+
4558
## Troubleshooting symbol sets
4659

4760
Compiled or minified languages requires additional information to perform a process called symbolification to produce the same stack trace and code context output shown above. The additional information is known as a symbol set.

src/navs/index.js

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3917,6 +3917,20 @@ export const docsMenu = {
39173917
color: 'green',
39183918
featured: true,
39193919
},
3920+
{
3921+
name: 'Group exceptions into issues',
3922+
url: '/docs/error-tracking/grouping-issues',
3923+
icon: 'IconList',
3924+
color: 'yellow',
3925+
featured: true,
3926+
},
3927+
{
3928+
name: 'Monitor and search issues',
3929+
url: '/docs/error-tracking/monitoring',
3930+
icon: 'IconSearch',
3931+
color: 'seagreen',
3932+
featured: true,
3933+
},
39203934
{
39213935
name: 'Manage and resolve issues',
39223936
url: '/docs/error-tracking/managing-issues',
@@ -3930,29 +3944,12 @@ export const docsMenu = {
39303944
icon: 'IconUser',
39313945
color: 'blue',
39323946
featured: true,
3933-
children: [
3934-
{
3935-
name: 'Overview',
3936-
url: '/docs/error-tracking/assigning-issues',
3937-
},
3938-
{
3939-
name: 'Track in GitHub and Linear',
3940-
url: '/docs/error-tracking/external-tracking',
3941-
},
3942-
],
3943-
},
3944-
{
3945-
name: 'Group exceptions into issues',
3946-
url: '/docs/error-tracking/grouping-issues',
3947-
icon: 'IconList',
3948-
color: 'yellow',
3949-
featured: true,
39503947
},
39513948
{
3952-
name: 'Monitor and search issues',
3953-
url: '/docs/error-tracking/monitoring',
3954-
icon: 'IconSearch',
3955-
color: 'seagreen',
3949+
name: 'Set up integrations',
3950+
url: '/docs/error-tracking/integrations',
3951+
icon: 'IconApps',
3952+
color: 'green',
39563953
featured: true,
39573954
},
39583955
{

vercel.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,10 @@
910910
"source": "/docs/error-tracking/filter-and-search-issues",
911911
"destination": "/docs/error-tracking/managing-issues"
912912
},
913+
{
914+
"source": "/docs/error-tracking/external-tracking",
915+
"destination": "/docs/error-tracking/integrations"
916+
},
913917
{ "source": "/blog/how-we-do-hiring-and-hr-at-posthog", "destination": "/handbook/people/hiring-process" },
914918
{ "source": "/api", "destination": "/docs/api" },
915919
{ "source": "/docs/data/subscriptions", "destination": "/docs/product-analytics/subscriptions" },

0 commit comments

Comments
 (0)