# Git Provider Receiver | Status | | | ------------- |-----------| | Stability | [development]: metrics | | Distributions | [liatrio] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fgitprovider%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fgitprovider) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fgitprovider%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fgitprovider) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@adrielp](https://www.github.com/adrielp), [@astencel-sumo](https://www.github.com/astencel-sumo) | [development]: https://github.com/open-telemetry/opentelemetry-collector#development [liatrio]: https://github.com/liatrio/liatrio-otel-collector The Git Provider receiver scrapes data from Git vendors. As a starting point, this receiver can infer many of the same core git 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](./documentation.md). These default metrics can be used as leading indicators to the DORA metrics; helping provide insight into modern-day engineering practices. ## GitHub Metrics The current metrics available via scraping from GitHub are: - [x] Repository count - [ ] Repository branch time - [x] Repository branch count - [x] Repository contributor count - [ ] Repository pull request time - [ ] Repository pull request merge time - [ ] Repository pull request approval time - [ ] Repository pull request deployment time > Note: Some metrics may be disabled by default and have to be explicitly enabled. > For example, the repository contributor count metric is one such metric. This is > because this metric relies on the REST API which is subject to lower rate limits. ## 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. ```yaml gitprovider: collection_interval: #default = 30s scrapers: : : ... ``` A more complete example using the GitHub & GitLab scrapers with authentication is as follows: ```yaml extensions: bearertokenauth/github: token: ${env:GH_PAT} receivers: gitprovider: initial_delay: 1s collection_interval: 60s scrapers: github: metrics: git.repository.contributor.count: enabled: true github_org: myfancyorg search_query: "org:myfancyorg topic:o11yalltheway" #optional query override, defaults to "{org,user}:" 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](https://github.com/liatrio/liatrio-otel-collector) where a quick start exists with an [example config](https://github.com/liatrio/liatrio-otel-collector/blob/main/config/config.yaml) The available scrapers are: | Scraper | Description | |----------|-------------------------| | [github] | Git Metrics from [GitHub](https://github.com/) |