Skip to content

About

OpenTelemetry exporter for GitHub pull request and issue activity

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

401 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-activity-exporter

CI Registry Validate Release Latest Release Go Version License

GitHub pull request and issue activity exporter — collects PR and issue metrics from the GitHub API, optionally including Renovate Dependency Dashboard state, and pushes them via OTLP to any OpenTelemetry-compatible backend (Grafana Cloud, Prometheus with OTLP receiver, Datadog, etc.).

Features

Quick Start

Create config.yaml:

export:
  otlp:
    endpoint: http://my-otel-collector:4318
targets:
  - name: my-org
    orgs:
      - org: my-org

With no auth block the target uses the GITHUB_TOKEN env var as a PAT. The token needs read access to pull requests and issues; see GitHub permissions.

Run the image with the config mounted at /etc/github-activity-exporter/config.yaml:

docker run --rm \
  -e GITHUB_TOKEN=ghp_... \
  -v "$PWD/config.yaml:/etc/github-activity-exporter/config.yaml:ro" \
  ghcr.io/gjed/github-activity-exporter:latest

Metrics are pushed to the OTLP endpoint after each collection cycle (default: every 5 minutes).

To also expose a Prometheus scrape endpoint, set export.prometheus.enabled: true in the config and add -p 9090:9090.

Every config key is in Configuration. For a large org, size the collection with Collection and rate limits.

Installation

Docker

docker pull ghcr.io/gjed/github-activity-exporter:latest

Kubernetes

The Helm chart is published to GHCR with each release; the chart version equals the exporter version:

helm install github-activity-exporter oci://ghcr.io/gjed/charts/github-activity-exporter \
  --version X.Y.Z --namespace github-activity-exporter --create-namespace -f values.yaml

values.yaml holds the exporter config file verbatim under config, and Secret wiring for the GitHub credentials and OTLP headers under secret. See the chart README for the values, the probe settings and why the chart runs a single replica, and the examples.

From source

go install github.com/gjed/github-activity-exporter/cmd/github-activity-exporter@latest

Backend requirements

Metric names are exported as declared in the registry, for example github.pr.count, with no _total or unit suffix and no underscore escaping (see Metric naming). Your backend must keep the names as sent (OTLP translation strategy NoTranslation):

  • Prometheus 3.x: UTF-8 metric names (metric_name_validation_scheme: utf8, the 3.x default). For OTLP ingestion, run with --web.enable-otlp-receiver and set otlp.translation_strategy: NoTranslation.
  • Mimir: -validation.name-validation-scheme=utf8, -distributor.otel-translation-strategy=NoTranslation and -distributor.otel-metric-suffixes-enabled=false (per-tenant limits name_validation_scheme, otel_translation_strategy, otel_metric_suffixes_enabled).
  • Grafana Cloud Metrics: the same Mimir per-tenant limits on your stack.

Documentation

Page Covers
Configuration Config file reference, Renovate preset, environment variables
Collection and rate limits Collection schedule, concurrency sizing, GraphQL cost
GitHub permissions Permissions per auth mode, startup check, GitHub App manifest
Health endpoints /healthz and /readyz
Metrics Exported metrics, PR events, PR size and author, metric naming
Grafana dashboards The two generated dashboards
Self-telemetry Metrics, traces, logs and profiles about the exporter itself
Helm chart Chart values, Secrets, probes, examples

Contributing

Build, test, code generation, CI and releases are in CONTRIBUTING.md.

License

Apache 2.0

About

OpenTelemetry exporter for GitHub pull request and issue activity

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages