Git Provider Receiver
The Git Provider receiver scrapes data from Version Control Systems (VCS) that use Git as their underlying technology.
As a starting point, this receiver can infer many of the same core VCS metrics across vendors, while being able to receive additional data specific to vendors.
The current default set of metrics common across all vendors can be found in documentation.md.
These VCS metrics can be used as leading indicators (capabilities) to the DORA metrics; helping provide insight into modern-day engineering practices.
Getting Started
The collection interval is common to all scrapers and is set to 30 seconds by default.
Note: Generally speaking, if the vendor allows for anonymous API calls, then you
won't have to configure any authentication, but you may only see public repositories
and organizations. You may run into significantly more rate limiting.
gitprovider:
collection_interval: <duration> #default = 30s recommended 300s
scrapers:
<scraper1>:
<scraper2>:
...
A more complete example using the GitHub scrapers with authentication is as follows:
extensions:
bearertokenauth/github:
token: ${env:GH_PAT}
receivers:
gitprovider:
initial_delay: 1s
collection_interval: 60s
scrapers:
github:
metrics:
vcs.repository.contributor.count:
enabled: true
github_org: myfancyorg
search_query: "org:myfancyorg topic:o11yalltheway" #Recommended optional query override, defaults to "{org,user}:<github_org>"
endpoint: "https://selfmanagedenterpriseserver.com"
auth:
authenticator: bearertokenauth/github
service:
extensions: [bearertokenauth/github]
pipelines:
metrics:
receivers: [..., gitprovider]
processors: []
exporters: [...]
This receiver is developed upstream in the liatrio-otel-collector distribution
where a quick start exists with an example config
A Grafana Dashboard exists on the marketplace for this receiver and can be
found here.
The available scrapers are:
Scraper |
Description |
[github] |
VCS Metrics from GitHub |
GitHub Scraper
Important:
- The GitHub scraper does not emit metrics for branches that have not had
changes since creation from the default branch (trunk).
- Due to GitHub API limitations, it is possible for the branch time metric to
change when rebases occur, recreating the commits with new timestamps.
For additional context on GitHub scraper limitations and inner workings please
see the GitHub Scraper README.