Skip to content

feat(telemetry): add github traffic metrics to project velocity and automate collection in roadmap-service #1227

Closed

Description

@dan-petty

Provide GitHub repository traffic analytics (views, unique visitors, clones, cloners, top referrers, and popular paths) alongside project velocity metrics, add traffic panels to the Project & Engineering Velocity Grafana dashboard, and automate periodic metric collection in roadmap-service.

Activity

  1. added this to the v0.2.27 milestone on Oct 5, 2026
  2. added
    type/feature
    scope/telemetry
    scope/github
    priority/p1-high
    on Oct 5, 2026
  3. removed this from the v0.2.27 milestone on Oct 5, 2026
  4. dan-petty-bot commented on Oct 5, 2026

    @dan-petty-bot
    Collaborator

    Moved to the backlog: after v0.2.27 started, only a critical fix can join it. A person can place it in a planned release, and that placement stands. (devops roadmap reprioritize)

  5. dan-petty-bot commented on Oct 5, 2026

    @dan-petty-bot
    Collaborator

    What changed

    #1228, merged into release/v0.2.27 as ca7cb03.

    Summary

    Resolves #1227.

    • Adds 8 GitHub repository traffic and engagement telemetry instruments (devops_cli_project_traffic_views_total, devops_cli_project_traffic_views_uniques_total, devops_cli_project_traffic_clones_total, devops_cli_project_traffic_clones_uniques_total, devops_cli_project_traffic_referrers_total, devops_cli_project_traffic_paths_total, devops_cli_project_stars_total, devops_cli_project_forks_total).
    • Implements record_project_metrics_in_registry to populate GLOBAL_METRICS with gauges, exposed directly via roadmap-service:8000/metrics for Prometheus scraping by k8s-monitoring.
    • Registers a scheduled metrics job in DEFAULT_DUE_TABLE in roadmap-service running immediately on startup and every 15 minutes.
    • Adds a dedicated "GitHub Traffic & Repository Engagement" section (stat and bargauge panels) to the Project & Engineering Velocity Grafana dashboard (k8s/monitoring/dashboards/project-metrics.json).
    • Enhances devops gh metrics with traffic overview panels and referral/path tables.

    13 file(s) changed.

    How it was verified

    Check runs at 90435b4:

    • Prune PR DevContainer Images: pass
    • CodeQL: pass
    • Static Analysis: pass
    • Analyze (actions): pass
    • Analyze (python): pass
    • Tests & Coverage: pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1227-github-traffic-velocity-metrics.md:

    • 8 GitHub traffic and engagement instruments added to src/devops_cli/telemetry/instruments.py and included in INSTRUMENTS.
    • Pydantic models and decomposed fetch helpers added to src/devops_cli/github/metrics.py.
    • record_project_metrics_in_registry implemented to set Prometheus gauges in InMemoryMetricsRegistry.
    • DEFAULT_DUE_TABLE in roadmap-service executes metrics job immediately on startup and every 15 minutes.
    • k8s/monitoring/dashboards/project-metrics.json updated with GitHub Traffic & Repository Engagement section and panels.
    • devops gh metrics renders traffic statistics and referral/path tables.
    • tests/test_telemetry_instruments.py passes verification that all dashboard queries match emitted instruments.
    • tests/test_roadmap_run.py and tests/test_github_metrics.py unit tests pass with 100% coverage.
    • Changelog fragment changelog.d/1227.md added.
    • uv run devops ci passes with 100% green status across all quality gates.
  6. added a commit that references this issue on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/githubscope/telemetrytype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions