GitHub integration to Loggly
Loggly’s GitHub integration makes it easy to view the source code related to a Loggly event. You can also identify what changes were made recently to the source code, send your Loggly event items to GitHub Issues, link your stack traces to the code where it happened, resolve items when a particular commit is deployed, and show the commits that were included with each deploy. Loggly can integrate with JIRA and GitHub, so you can manage Loggly-detected errors in your existing workflow.
This capability is supported for Python, Java, PHP 5.6 and 7.0 and C# exceptions at this time.
Unity logs are not supported with the GitHub Integration.
When you configure Loggly's GitHub integration, you will need to know your OAuth application name, OAuth key, and OAuth secret. These are available in your OAuth application's settings. Log into your GitHub account, navigate to your GitHub Developer Settings, and click OAuth Apps.
Application already registered
If you have already registered your application, click the application's name to view that application's settings. The name at the top of the page is your OAuth Application Name, the Client ID is your OAuth Key, and the Client Secret is your OAuth Secret.
Application not yet registered
If you have not already registered your application:
Click New OAuth App.
- Enter a name for the application and homepage URL in the corresponding fields.
https://subdomain.loggly.com/integrations/github/in the authorization callback URL field.
- SUBDOMAIN: your account subdomain that you created when you signed up for Loggly
Click Register application. The application's settings page loads.
The name at the top of the page is your OAuth Application Name, the Client ID is your OAuth Key, and the Client Secret is your OAuth Secret.
Connect your Account
In the navigation menu, click Source Setup > GitHub Integration.
Enter the OAuth Application Name, OAuth Key, and OAuth Secret you found in GitHub in the corresponding fields.
Click the Grant access to drop-down menu and select whether Loggly should look for all repositories in your organization or only public repositories.
Click Connect to GitHub. Loggly will attempt to connect to your GitHub application. If prompted, select the GitHub organization you would like to connect to, click Authorize your GitHub account, and enter your GitHub credentials.
If the credentials are correct you will see the Success message indicating that the GitHub integration connection was successful.
Click Default Repository and select a repository to integrate with Loggly. Loggly will use this to match the stack trace with corresponding source code
(Optional) To match a repository's source code to exceptions in a specific source group's log data:
- Click the Repository drop-down menu and select the repository you would like to match against log exceptions.
- Click the maps to source group drop-down menu and select the source groups that contain the logs you would like matched with the selected repository. To include another source group in the match, click the plus button next to maps to source groups drop-down menu and repeat this step.
- To match additional repositories with a source group's log data, repeat this step
- Click Save.
View your Source Code in Loggly Search
When a Loggly account is connected to a git repository, stack traces will include links to each file in the code version where the error was most recently activated.
Find a stack trace in the Loggly Event Viewer. Move the mouse over the Source code tags and click on the tag icons.
This will open the source code from GitHub directly in the Loggly Event Viewer, as shown below, along with other important details such as Author, Commit Message and Date. You can click on View in GitHub if you want to see the source code directly within the GitHub account.
To view the commits to the code, you could also click on the Commits tab, as shown below.
This will list the Author, Commit, Message and Date of the commit and this list will be sorted by date and time in descending order. This allows you to check the latest commits to the code directly within Loggly. Alternatively, you can click "View in GitHub" to see the code in GitHub.
Create GitHub issues or add comments
After connecting with GitHub you can create GitHub issues or add comments directly from events in the Loggly Search page.
When Loggly is connected to your issue tracker you can manually create an issue to track an error/event seen under the Loggly search page.
Click the hamburger menu in action bar for the event in question. Click Create issue under the GitHub section.
In the Create a new GitHub issue window, fill in the required details in the issue fields.
After entering the details, click "Create issue button. You will get a confirmation dialogue at the top to indicate that the issue has been created in your GitHub account via this integration.
To add a comment to an existing issue from a Loggly error event:
- Select the repository and select the GitHub issue that needs a comment.
- Enter the text under the comment window.
- Check or uncheck to enable/disable Include event details in comment.
- Check or uncheck to enable/disable Include permalink in comment.
- Click Add to add the comment to the GitHub issue. You will get a confirmation message at the top indicating that the comment was added successfully.
When the APM Integrated Experience is enabled, Loggly shares a common navigation and settings with the other integrated experiences' products. How you navigate Loggly and access its features may vary from these instructions. For more information, go to the APM Integrated Experience documentation.