GitHub Apps is a service that helps you automate key processes in your workflow. Datadog now uses GitHub Apps to interact directly with the GitHub API, enabling you to add valuable context to your notebooks. And once you’ve also integrated Datadog with your source code, you can access links to Git repositories and inline code snippets for stack traces. In this post, we’ll show you how these integrations work together to enrich your monitoring data, allowing you to troubleshoot more effectively and reduce your mean time to resolution (MTTR).
Reduce your MTTR with inline code snippets
Datadog’s source code integration connects your telemetry to your Git repositories, whether they’re hosted in GitHub, GitLab, or Bitbucket. Once you’ve enabled the integration, you can debug stack traces, slow profiles, and other issues by quickly accessing the relevant lines of code in your repository.
GitHub links also appear within faulty deployments to help you resolve issues that appear after your application deploys. When used with Deployment Tracking, you can quickly spot what’s changed from your previous deployment and fix any bad commits.
Enabling both the aforementioned source code and GitHub integration takes this functionality even further with inline code snippets. You can view code snippets right alongside the errors they prompted, allowing you to see which lines of code are impacting your users’ experiences and quickly determine next steps, drastically reducing your MTTR.
These integrations help you pinpoint the root cause of a problem without leaving Datadog—and then easily access your Git repositories once you’re ready to start working on a fix. If Error Tracking surfaces an important issue, you can instantly start troubleshooting by inspecting inline snippets to identify what needs to be corrected.
Get key information fast with Datadog’s GitHub integration
Datadog’s GitHub integration works seamlessly with Notebooks, allowing you to create richer postmortems, investigations, and reports by adding link previews of issues and pull requests. This means that everyone on your team can get crucial, up-to-date details about specific issues and pull requests at a glance, such as the requester, the number of commits, status, and the description.
For example, if you link to an issue, the preview allows users to quickly see who worked on it and the tasks they completed. Or, to provide a more complete picture of incident response in your postmortems, you can include links to pull requests that help illustrate remediation efforts, followup action items, or root causes of an outage.
In the screenshot above, hovering over the link allows the user to see a high-priority pull request implementing a fix, so they can understand which steps have already been taken to resolve the problem. If anyone wants to do additional research, they can use these link previews to decide which items they want to look at in more depth and quickly pivot to GitHub for more details.
Datadog’s GitHub and source code integrations, better together
Datadog’s GitHub and source code integration automatically connects your telemetry data to your code, so you can fix issues more quickly and reduce context switching. Both integrations are powerful on their own, with support for link previews and direct access to your repositories. When combined, you can also access inline code snippets for faster troubleshooting.
Check out our GitHub documentation to get started with these features. The GitHub integration is customizable—with the ability to limit access to specific Git repositories—to give you control over who can access what information. You can also use the integration to send your workflow data to CI Visibility via GitHub Actions, for additional insight into your pipeline metrics. In order to link your source code to Datadog, simply tag your containers with the appropriate Git commit SHAs and then upload your Git metadata to Datadog by running
datadog-ci git-metadata upload. See our source code integration documentation for more details. If you’re new to Datadog, get started with a 14-day free trial.