GitHub Integration
Metoro can integrate with GitHub to access your repositories, allowing for enhanced observability of your GitHub projects. The integration uses a GitHub App for secure, fine-grained access to your repositories without requiring personal access tokens.Configuration
To set up GitHub integration:- Navigate to Settings > Integrations in the Metoro UI
- Find the GitHub section and click Connect GitHub
- You’ll be redirected to GitHub to authorize the Metoro GitHub App
- Select your organization or personal account
- Choose repository access:
- All repositories - Recommended for full coverage
- Selected repositories - Choose specific repos to grant access
- Review the requested permissions and click Install & Authorize
- You’ll be redirected back to Metoro with GitHub successfully connected
The Metoro GitHub App requires read access to repository contents, metadata, and write access to pull requests and issues. No personal access tokens are required.
Managing the Integration
Once configured, you can:- View the status of your GitHub integration in the Integrations tab
- Disconnect the integration by clicking the “Disconnect” button
- Modify repository access by visiting the GitHub App settings in your GitHub account
Using GitHub Integration
With GitHub integration enabled, Metoro can:- Access your repository data
- Read code and configuration files
- Provide context-aware observability for your GitHub-hosted projects
- Create pull requests with suggested fixes (via Guardian AI)
- Create GitHub issues from investigations
Linking Services to Source Code
You can link your Kubernetes services to their source code repositories in two ways:Option 1: Using Kubernetes Annotations (Recommended)
Add annotations to your Deployment, DaemonSet, or StatefulSet to automatically link the service to its source code. This is the recommended approach as it follows GitOps principles and keeps your source code configuration in version control. Available Annotations:| Annotation | Description | Required |
|---|---|---|
metoro.source.repository | Full URL to the GitHub repository (e.g., https://github.com/org/repo) | Yes |
metoro.source.path | Path within the repository for monorepos (e.g., /services/api) | No |
metoro.source.branch | Development branch name (e.g., develop). Defaults to repository’s default branch. | No |
When using annotations, the source code linking cannot be edited through the Metoro UI. To change the configuration, update the annotations in your Kubernetes manifests.
metoro.source.repository.base64metoro.source.path.base64metoro.source.branch.base64
Option 2: Manual UI Configuration
You can also link services manually through the Metoro UI:- Navigate to the Service page for the service you want to link
- Click the Source Code button in the header
- Click Link Source Code
- Select the repository, optional path, and branch
- Click Save
If a service has source code annotations on its Kubernetes resource, the annotations take precedence and the UI will not allow manual edits. Remove the annotations first if you want to manage the linking through the UI.
Security Considerations
- Metoro uses a GitHub App for authentication, which provides fine-grained permissions and doesn’t require personal access tokens
- Only the GitHub App installation ID is stored per organization - no long-lived tokens are stored
- Access tokens are generated on-demand with short expiration times (10 minutes)
- You can revoke access at any time from your GitHub account’s Settings > Applications > Installed GitHub Apps
- The GitHub App only has access to repositories you explicitly grant during installation
