AZ-400: Designing and Implementing Microsoft DevOps Solutions

Configure Monitoring for a DevOps Environment

Configure monitoring in GitHub

Monitoring your GitHub repositories is essential for maintaining code quality, improving collaboration, and optimizing CI/CD pipelines. In this guide, we’ll walk through GitHub Insights, traffic analytics, dependency scanning, workflow performance, and more to help you build a comprehensive instrumentation strategy.

Repository Overview

Start by reviewing the structure of your repository. For example, here’s the KodeKloudCoffee project:

The image shows a GitHub repository named "KodeKloudCoffee" with various files and folders, including `.github/workflows`, `public`, and several JavaScript files. The repository has 20 commits and no description provided.

Understanding the layout—workflows, source files, documentation—helps you pinpoint where to add monitoring hooks, automated scans, and notifications.

GitHub Insights Overview

Navigate to Insights in your repository to see an at-a-glance summary of activity:

The image shows a GitHub repository insights page for "KodeKloudCoffee," displaying an overview of activity from October 2, 2024, to October 9, 2024, with no active pull requests or issues and 20 commits by one author.

This dashboard highlights:

  • Pull request and issue activity
  • Commit counts by branch and author
  • Weekly trends and contribution spikes

A healthy repository shows steady commit frequency, prompt PR reviews, and low issue backlog.

Key Monitoring Features at a Glance

Monitoring AreaLocationKey Metrics
InsightsInsightsCommits, PR cycle time, issue resolution
TrafficInsights → TrafficClones, visitors, referring sites
Commits & ChurnInsights → CommitsDaily commit volume, code churn
Dependency UpdatesInsights → Dependency graphOutdated packages, security alerts
Actions UsageSettings → Actions → UsageJob runs, minutes consumed, runner type

Contributors

Discover who’s driving development. Under Insights ▶ Contributors, you’ll see a timeline and per-author breakdown:

The image shows a GitHub contributions graph for a user, displaying commits over time from September 28, 2024, to October 5, 2024. The graph indicates a steady increase in contributions, with a total of 20 commits.

This helps identify:

  • Core contributors vs. occasional committers
  • Periods of high or low activity

Community Standards

For public repositories, use Insights ▶ Community Standards to surface missing files:

The image shows a GitHub repository page focused on "Community Standards," with a checklist for items like description, README, code of conduct, and more.

Enable templates and policy files to onboard new contributors quickly:

  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • Issue & PR templates

Traffic Analytics

Track repository popularity and usage patterns:

The image shows a GitHub traffic analytics page with graphs displaying data on clones and visitors over a period of time. It highlights a spike in views and unique visitors on October 7, 2024.

Key metrics:

  • Total clones vs. unique clones
  • Unique visitors vs. page views
  • Top referring sites

Note

Public repos benefit the most from traffic metrics, but private projects can still track internal interest and cloning frequency.

Commit Activity and Churn

Review commit spikes and identify possible friction in your CI/CD pipeline:

The image shows a GitHub insights page with a graph displaying commit activity over time, highlighting a peak of 20 commits on a Monday.

Warning

High “churn” (many commits in quick succession) often signals failing tests or deployment loops. Investigate CI logs when you see unusual peaks.

Code Frequency

In Insights → Code frequency, track weekly additions vs. deletions to gauge:

  • Feature development velocity
  • Refactoring or cleanup efforts

Neither high additions nor deletions are inherently good or bad, but sudden swings can indicate large-scale changes or cleanup.

Dependency Graph and Dependabot

Stay ahead of security vulnerabilities by enabling Dependabot:

The image shows a GitHub repository page with the "Dependency graph" section open, indicating that Dependabot version updates aren't configured yet. There is an option to create a config file.

Add a .github/dependabot.yml:

version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"            
    schedule:
      interval: "weekly"

This schedules weekly PRs for dependency updates, reducing your security risk.

The image shows a GitHub repository page named "KodeKloudCoffee" with a list of files and folders, including `.github`, `public`, and `README.md`. The repository has 21 commits and no stars or forks.

Network Graph

Visualize branching patterns and merges under Insights ▶ Network:

The image shows a GitHub network graph for the repository "KodeKloudCoffee," displaying a timeline of recent commits by the owner "jeremykodekloud" on the main branch. The interface includes navigation options like Pulse, Contributors, and Community.

Use it to spot long-lived feature branches and merge bottlenecks.

Forks

The Forks counter shows how often others have cloned your repo to contribute. It’s more critical for open-source projects but can indicate internal forks for experimentation.

Actions Usage

Monitor CI/CD costs and performance in Settings ▶ Actions ▶ Usage:

The image shows a GitHub Actions Usage Metrics page, displaying total minutes and job runs for workflows in a repository. It includes details of specific jobs, their total minutes, job runs, runner type, and runtime OS.

Consider self-hosted runners if your minutes exceed the free tier.

Workflow Runs and Performance

Under Actions, inspect each workflow’s history and timings:

The image shows a GitHub Actions page for the repository "KodeKloudCoffee," displaying a list of workflow runs with their statuses and details.

Example deployment step in azure/webapps-deploy@v2:

- run: azure/webapps-deploy@v2
  with:
    app-name: kodekloudcoffee
    publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
    package: .
    slot-name: production
  env:
    AZURE_WEBAPP_NAME: kodekloudcoffee
    AZURE_WEBAPP_PACKAGE_PATH: .
    NODE_VERSION: 20.x

Optimize slow steps by caching dependencies and parallelizing jobs.

Email Notifications

Set up email alerts in Settings ▶ Notifications:

The image shows a GitHub settings page for configuring email notifications, with options to set email addresses and activate notifications for push events.

Configure organizational mailing lists or approved headers to prevent alerts from being marked as spam.

Webhooks

Use Settings ▶ Webhooks to push real-time event data to external systems:

The image shows the "Webhooks" settings page of a GitHub repository, where users can add webhooks to notify external services of certain events.

Webhooks enable integrations with Slack, Jira, or custom dashboards for immediate feedback.


By leveraging GitHub’s built-in monitoring tools, you’ll gain actionable insights into team productivity, code health, and pipeline performance. Happy monitoring!

Watch Video

Watch video content

Previous
Configure collection of telemetry by using Azure various services