GitHub Apps

Overview

Connect Datadog with GitHub Apps to enable permissions for your repositories and see code snippets in your errors. You can also display links to GitHub PRs and issues in Datadog’s notebooks and incident timelines.

Setup

Installation

Install the integration tile with the Datadog GitHub Apps integration tile.

Configuration

If you are an admin in your GitHub organization, you can configure GitHub Apps.

  1. In the GitHub Apps integration tile, navigate to the Configuration tab.

  2. Click Link GitHub Account to create a new GitHub App.

  3. In Configure, either select Organization and enter a name for your organization, or select Personal Account. Optionally, specify the URL of your GitHub Enterprise Server instance (version 2.22 or above) and ensure Datadog servers can connect to your Enterprise instance. Server IPs are available in the Webhooks section of IP Ranges.

  4. In Edit Permissions, enable Datadog read permissions for issues, pull requests, and contents. You must select at least one permission.

  5. Click Create App in GitHub, then you are prompted to enter a GitHub App name in GitHub.

  6. Enter a name in the GitHub App name field and click Create GitHub App.

  7. In the Configuration tab, click Install GitHub App and Install & Authorize.

Your GitHub App displays in the integration tile. To enable inline code snippets in stack traces, see Setting Up Source Code Integration.

Notebooks

In Notebooks, GitHub issues and pull requests automatically generate a preview hoverbox with additional details including commit history, author, and date.

  1. Navigate to Notebooks > New Notebook.
  2. Add a Text cell and mention an issue or pull request on GitHub in the Edit field, for example: https://github.com/project/repository/pull/#.
  3. Click Done, then the GitHub icon appears next to your linked issue or pull request.
  4. Click Connect to Preview and Authorize.
  5. Hover over the linked issue or pull request to see the description preview.
Links to Git

Data Collected - Telemetry

Audit Logs

Audit logs encompass all activities and events across a GitHub organization. Upon an application’s installation, allow for Organization Administration permissions to have read access.
This enables the application to begin collecting GitHub’s audit stream as Logs on behalf of the GitHub organization.

To opt out of Audit Log collection, find the corresponding organization in the Telemetery tab on the GitHub Apps integration tile and toggle Audit Log collection.

For more information about Audit Logs, see the GitHub documentation for Audit log actions and Setting up streaming to Datadog.

Metrics

The GitHub Apps integration collects Code Scan Alert and Secret Scan Alert metrics. To start collecting these metrics, select the respective permissions for read access upon the application’s installation.

These metrics provide an overview of the organization’s Alert state by categorizing their state, repo, and secret type. These metrics also provide long term insights on Alert trends and their general progress.

To opt out of Code Scan or Secret Scan metrics, find the corresponding Organization in the Telemetery tab on the GitHub Apps integration tile and toggle the respective section.

For more information, see the GitHub documentation for Code Scans and Secret Scans.

Events

The GitHub Apps integration does not include any events.

Service Checks

The GitHub Apps integration does not include any service checks.

Troubleshooting

Need help? Contact Datadog support.

Further Reading

Additional helpful documentation, links, and articles: