Skip to content
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

Admin collector #23

Closed
wants to merge 3 commits into from
Closed

Admin collector #23

wants to merge 3 commits into from

Conversation

mafrosis
Copy link
Contributor

A new collector!

Simply wraps this API:
https://docs.github.com/en/[email protected]/rest/reference/enterprise-admin#admin-stats

Only contentious issue might be formatting - it was rather verbose and frankly just an enormous pile of boilerplate wrapping the go-github lib. So I made it more concise by removing a lot of line breaks..

@tboerger
Copy link
Member

I'm waiting for a developer license for GutHub Enterprise, I would like to give it a try first.


// NewAdminStatsCollector returns a new AdminStatsCollector.
func NewAdminStatsCollector(logger log.Logger, client *github.Client, failures *prometheus.CounterVec, duration *prometheus.HistogramVec, cfg config.Target) *AdminStatsCollector {
failures.WithLabelValues("org").Add(0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed this should be adminstats. Let me know if you have any other feedback before I push a fix

@tboerger
Copy link
Member

Sadly GitHub never came back to me with a developer license :(

@tboerger tboerger added the enhancement New feature or request label Mar 23, 2023
@tboerger tboerger added this to the v2.0.0 milestone Mar 23, 2023
@tboerger
Copy link
Member

@mafrosis thanks for your effort, finally I have integrated the admin stats, sadly you have removed the repo fork and I haven't been able to cherry-pick your commits. You can see the result at #184, currently it's only part of latest image, but it will be part of a 2.0.0 release.

@tboerger tboerger closed this Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants