Set up integrations
Contents
PostHog integrates with GitHub, GitLab, and Linear to enhance error tracking with source code context, commit information, and external issue tracking.
| Integration | Capabilities |
|---|---|
| GitHub | Pinpoint Git commits that cause issues, open files in GitHub directly from stack traces, and create GitHub issues from errors |
| GitLab | Pinpoint Git commits that cause issues, open files in GitLab directly from stack traces, and create GitLab issues from errors |
| Linear | Create Linear issues directly from errors and track fixes in your existing Linear workflows |
GitHub integration
To set up the GitHub integration:
- Go to Error tracking settings in the PostHog app and find Integrations
- Under GitHub, click Connect organization
- Authorize PostHog to access your repositories
- Select the repositories you want to link
PostHog connects to GitHub by installing a GitHub application. PostHog needs the following permissions:
- Read access to metadata
- Read and write access to code, issues, and pull requests
Once connected, create a release to start using source linking.
GitLab integration
To set up the GitLab integration:
- Go to Error tracking settings in the PostHog app and find Integrations
- Under GitLab, click Connect project
- Provide the following information:
- Hostname
- Project ID
- A project access token with the
apiscope
PostHog connects to GitLab using a project access token.
Once connected, create a release to start using source linking.
Linear integration
Connect your Linear workspace to create and track Linear issues directly from error tracking.
To set up the Linear integration:
- Go to Error tracking settings in the PostHog app and find Integrations
- Under Linear, click Connect workspace
- Authorize PostHog to access your Linear workspace
PostHog connects to Linear using a third-party app. PostHog needs the following permissions:
- Create issues for your workspace
- Read access to your workspace
What's next?
After setting up an integration:
- Upload source maps for better stack traces
- Create releases to link errors to specific deployments
- Create external issues from PostHog
PostHog is an all-in-one developer platform for building successful products. We provide product analytics, web analytics, session replay, error tracking, feature flags, experiments, surveys, LLM analytics, data warehouse, CDP, and an AI product assistant to help debug your code, ship features faster, and keep all your usage and customer data in one stack.