agent icon indicating copy to clipboard operation
agent copied to clipboard

Improve Github Integration

Open proffalken opened this issue 3 years ago • 6 comments
trafficstars

I'd like to improve the Gihub Integration so we can get the following metrics:

  1. Issue state (at the moment, it only returns "open" issues. We'd like to track open vs closed vs reopened over time)
  2. Contributors, ideally with the number of PR's they've approved on the repo etc
  3. Enhanced PR data such as checks passed, approvals required vs approvals granted, and merged vs awaiting merge

I'm struggling to find the code where this would happen, can anyone enlighten me?

proffalken avatar Jul 01 '22 20:07 proffalken

Hi! We already had a chat on the public Slack, but I'll rewrite my answer here for anyone else who might be curious.

I definitely agree these things would be useful. Unfortunately, there's not much code in this repository for the exporter itself. Our code is in pkg/integrations/github_exporter, which wraps around the open source infinityworks/github-exporter exporter.

We tend to opt for existing exporters from the community so that:

  • We don't reinvent the wheel for code that already exists
  • We can add more integrations into the agent quickly
  • We help give existing exporters in the community get more attention

Fixes and new features would have to be made upstream, which we could then re-import downstream.

In this case, it looks like there hasn't been much activity in this specific upstream exporter. If the repo has become stale, we'll want to discuss whether it makes sense to do nothing (e.g., if it's considered feature-complete), fork it, find another existing exporter, or to write a new exporter for GitHub metrics.

rfratto avatar Jul 05 '22 13:07 rfratto

Finally got around to logging https://github.com/infinityworks/github-exporter/issues/85 to find out what the state of the exporter is and see where we go from here.

proffalken avatar Jul 28 '22 19:07 proffalken

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed in 7 days if there is no new activity. Thank you for your contributions!

github-actions[bot] avatar Aug 28 '22 00:08 github-actions[bot]

Given there's been no reply to my issue raised on the other repo, then I think we need to assume that the other project is dead.

Probably need to have a think about where we go from here, as being able to timestamp from git PR's is a really important part of our end-to-end observability

proffalken avatar Aug 28 '22 08:08 proffalken

@proffalken if the project is not really maintained (but still relevant) I think it could be transferred here which there are already non-official exporters. Although is just my opinion: not sure if any of both orgs would agree on doing this transfer of ownership.

marctc avatar Aug 29 '22 10:08 marctc

@marctc good idea, I'll log a ticket over there and see what they think.

proffalken avatar Aug 30 '22 08:08 proffalken

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed in 7 days if there is no new activity. Thank you for your contributions!

github-actions[bot] avatar Sep 30 '22 00:09 github-actions[bot]

Need to spend some time on the upstream to port it over to the prom community plugins repo

proffalken avatar Sep 30 '22 05:09 proffalken

Looks like github-exporter has been moved its own organization: https://github.com/githubexporter/github-exporter.

marctc avatar Jun 12 '23 09:06 marctc

@rfratto - does the information from @marctc mean that we'll automatically see updates from the new maintainers, or is there work to do in order to switch it over?

proffalken avatar Sep 22 '23 09:09 proffalken

Hey @proffalken, I tried to switch to the org/repo but I got some errors. This PR upstream should fix the issue. Thanks for the heads up!

marctc avatar Sep 22 '23 10:09 marctc