Why Connect GitHub?

Without GitHub integration, Guardian can only analyze runtime data (logs, traces, metrics, k8s resources, profiling). With GitHub connected, Guardian gains the ability to:

Code Analysis

Examine actual source code to understand implementation details and identify bugs

Change Correlation

Correlate issues with recent deployments and code changes

Fix Suggestions

Provide specific code fixes and implementation recommendations

Documentation Context

Reference your code comments, READMEs, and documentation during investigations

Setting Up GitHub Integration

If you are onboarding Guardian for the first time, you can connect GitHub directly from the onboarding flow or you can connect it later from the SettingsIntegrations page in Metoro
1

Navigate to Guardian Onboarding Page

Go to Guardian Overview and click on to Guardian onboarding button at the bottom right of the page.
2

Connect GitHub

In the Guardian onboarding flow, you will see a step to connect GitHub, click on Connect GitHub Account button.
  • If you are already connected, you can skip this step
3

Authorize in GitHub

You’ll be redirected to GitHub to authorize the Metoro app:
  1. Select your organization or personal account
  2. Choose repository access:
    • All repositories - Recommended for full coverage
    • Selected repositories - Choose specific repos to grant access
  3. Review requested permissions
  4. Click Install & Authorize After authorization, you’ll be redirected back to Metoro with GitHub successfully connected.
4

Link Repositories

After GitHub is connected, you need to map your services to their corresponding GitHub repositories. This can be done in the Link Repositories step in the onboarding flow or later in the Service Catalog -> Select your service -> Link Source Code button at the top right of the page Service Dashboard page.
Required Permissions: The Metoro GitHub App requiresRead access to:
  • Repository contents (code, branches, commits)
  • Repository metadata
Write access to:
  • Pull requests
  • Issues
Guardian will raise Pull Requests to fix issues detected but will never merge them automatically. You must review and merge any PRs created by Guardian.

Step 2: Verify Connection

After installation, verify the connection:
  1. Return to SettingsIntegrationsGitHub
  2. You should see:
    • ✅ GitHub Connected

Repository Mapping

Repository mapping links your Metoro services to their corresponding GitHub repositories, enabling Guardian to analyze the right code for each service.

Understanding Service-to-Repository Mapping

Each service in your system needs to be mapped to its source code repository:
  • One-to-One: Single service maps to single repository (most common)
  • Monorepo: Multiple services map to same repository with different paths

Step 1: Access Repository Mapping

  1. Navigate to GuardianGuardian OnboardingLink Repositories
  2. You’ll see a list of all detected services in your system with the option to map each service to a repository.

Step 2: Map Services to Repositories

For each service, configure its repository mapping:
Standard Repository MappingFor services with dedicated repositories:
  1. Find your service in the list (e.g., payment-service)
  2. Click Map Repository
  3. Select the repository from dropdown (e.g., org/payment-service)
  4. Leave Repository Path empty (uses root)
  5. Click Save Mapping
Example:
  • Service: payment-service
  • Repository: metoro-org/payment-service
  • Path: / (root)

Advanced Configuration

Branch Selection

Configure which branch Guardian should analyze:
Guardian uses the repository’s default branch (usually main or master)No configuration needed - this is the default behavior

Validation Checklist

Run through this checklist to ensure proper setup:
  • GitHub App installed and authorized
  • Repositories accessible in Metoro
  • All production services mapped to repositories
  • Monorepo paths correctly configured
  • Mappings validated successfully
  • Test investigation completed successfully

FAQ

Next Steps