Navigation Notice: When the APM Integrated Experience is enabled, Loggly shares a common navigation and enhanced feature set with other integrated experience products. How you navigate Loggly and access its features may vary from these instructions.
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.
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.
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.
Replace SUBDOMAIN with your account subdomain (which 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.
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 drop-down menu next to Grant access to, and then 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) 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 all of Step 6.
- Click Save.
When a Loggly account is connected to a git repository, stack traces 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 the tag icons.
The source code opens 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 the Commits tab, as shown below.
The list includes the Author, Commit, Message and Date of the commit and is sorted by date and time in descending order. The list 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.
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 from the action bar (three vertical dots) for the event in question. Click Create issue under the GitHub section.
In the Create a new GitHub issue window, provide the required details in the issue fields.
After entering the details, click Create issue. A confirmation dialogue displays 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 text under the comment window.
- Add a check mark to enable (or clear to disable). Include event details in the comment.
- Add a check mark to enable (or clear to disable). Include a permalink in the comment.
- Click Add to add the comment to the GitHub issue. A confirmation message displays at the top indicating the comment was added successfully.