-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[receiver/gitproviderreceiver] add Pull Request metrics #29642
Conversation
This commit adds the definitions for the new metrics to the metadata.yaml file. It also includes the resulting updates for the code that's auto-generated.
This commit adds the `getPullRequests` method to the `helpers.go` file. I'm making this such a small commit mostly so I can verify my GitKraken client can create a commit and sign it properly.
When adding the code for the 4 metrics I set out to do, I realized adding the other 2 (PR Approval Time & PR Deployment Time) were really simple and easy to add so I included them as well. I can just as easily remove it if the team decides otherwise once I talk to them.
This commit adds the actual logic to gather & emit the PR metrics.
This commit adds the `getAgeHrs` function which will return the age/duration between two `time.Time` objects in hours.
|
I resolved the merge conflicts so it should be ready to review :) |
This commit renames the test function to be in line with the function it's testing.
receiver/gitproviderreceiver/internal/scraper/githubscraper/helpers.go
Outdated
Show resolved
Hide resolved
Co-authored-by: Adriel Perkins <adrielp@liatrio.com>
Okay, this PR is finally ready to merge. My last commits reverted the earlier suggested change where units were things like EDIT (2024/01/05 @ 12:52 CST): I'll edit this later with further information on what exactly it broke. EDIT (2024/01/09 @ 11:17 CST): Looks like I'm unable to reproduce the issue so this can be ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 👏 🙇
Looks like the build-and-test for windows is failing because it's trying to test a podman receiver on windows. This shouldn't block the merge of this pr correct @atoulme @astencel-sumo ? |
Have resolved several conflicts after changes to main and changes for lifecycle tests being merged. Workflows have been re-run now and the unrelated windows workflows that were previously failing look to be fixed. We're good to go! |
Description:
This is the 3rd PR for the
gitproviderreceiver
that adds functionality for the following Pull Request metrics:git.repository.pull_request.open.count
git.repository.pull_request.open.time
git.repository.pull_request.merged.count
git.repository.pull_request.merged.time
git.repository.pull_request.approved.time
Link to tracking Issue: #22028
Testing:
Basic tests included for new functionality.
Documentation:
Documentation has been updated to include information regarding the new metrics.