Skip to content

Commit

Permalink
[chore] adjust comments, docs, and descriptions based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
adrielp committed May 9, 2024
1 parent 415a590 commit cf1f39d
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 80 deletions.
11 changes: 9 additions & 2 deletions receiver/gitproviderreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ These default metrics can be used as leading indicators to the DORA metrics; hel

## GitHub Scraper

For specific limitations and context on the functionality and inner workings
of the GitHub scraper please see the [GitHub Scraper README][ghsread].
> 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][ghsread].

[ghsread]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/gitproviderreceiver/internal/scraper/githubscraper/README.md#github-limitations

Expand Down
22 changes: 11 additions & 11 deletions receiver/gitproviderreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metrics:
### git.repository.branch.commit.aheadby.count
Number of commits a branch is ahead of the default branch (trunk).
The number of commits a branch is ahead of the default branch (trunk).
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
Expand All @@ -29,7 +29,7 @@ Number of commits a branch is ahead of the default branch (trunk).
### git.repository.branch.commit.behindby.count
Number of commits a branch is behind the default branch (trunk).
The number of commits a branch is behind the default branch (trunk).
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
Expand All @@ -44,7 +44,7 @@ Number of commits a branch is behind the default branch (trunk).
### git.repository.branch.count
Number of branches in a repository
The number of branches in a repository.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
Expand All @@ -58,7 +58,7 @@ Number of branches in a repository
### git.repository.branch.line.addition.count
Count of lines added to code in a branch relative to the default branch (trunk).
The number of lines added to code in a branch relative to the default branch (trunk).
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
Expand All @@ -73,7 +73,7 @@ Count of lines added to code in a branch relative to the default branch (trunk).
### git.repository.branch.line.deletion.count
Count of lines deleted from code in a branch relative to the default branch (trunk).
The number of lines deleted from code in a branch relative to the default branch (trunk).
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
Expand Down Expand Up @@ -103,15 +103,15 @@ Time a branch created from the default branch (trunk) has existed.
### git.repository.count
Number of repositories in an organization
The number of repositories in an organization.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {repository} | Gauge | Int |
### git.repository.pull_request.count
The number of pull requests in a repository, categorized by their state (either open or merged)
The number of pull requests in a repository, categorized by their state (either open or merged).
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
Expand All @@ -126,7 +126,7 @@ The number of pull requests in a repository, categorized by their state (either
### git.repository.pull_request.time_open
The amount of time a pull request has been open
The amount of time a pull request has been open.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
Expand All @@ -141,7 +141,7 @@ The amount of time a pull request has been open
### git.repository.pull_request.time_to_approval
The amount of time it took a pull request to go from open to approved
The amount of time it took a pull request to go from open to approved.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
Expand All @@ -156,7 +156,7 @@ The amount of time it took a pull request to go from open to approved
### git.repository.pull_request.time_to_merge
The amount of time it took a pull request to go from open to merged
The amount of time it took a pull request to go from open to merged.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
Expand All @@ -181,7 +181,7 @@ metrics:
### git.repository.contributor.count
Total number of unique contributors to a repository
The number of unique contributors to a repository.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
Expand Down
4 changes: 2 additions & 2 deletions receiver/gitproviderreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v61 v61.0.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.100.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.99.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.100.0
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/component v0.100.0
go.opentelemetry.io/collector/config/confighttp v0.100.0
Expand Down Expand Up @@ -114,7 +114,7 @@ require (
golang.org/x/text v0.15.0 // indirect
gonum.org/v1/gonum v0.15.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434 // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions receiver/gitproviderreceiver/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions receiver/gitproviderreceiver/internal/metadata/generated_metrics.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cf1f39d

Please sign in to comment.