feat: add operator observability metrics and Grafana dashboard - #35
Merged
Conversation
pierinho13
enabled auto-merge
August 8, 2026 18:58
pierinho13
disabled auto-merge
August 8, 2026 19:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a small set of custom Prometheus metrics for
github-platform-operatorand provide a ready-to-import Grafana dashboard.The operator already exposes the standard
controller-runtime, Go and process metrics. This change complements them with GitHub-specific signals that are useful to understand API usage and rate-limit behavior without duplicating metrics already provided bycontroller-runtime.Custom metrics
The following metrics are now exposed:
github_platform_operator_github_api_requests_totalgithub_platform_operator_github_api_request_duration_secondsgithub_platform_operator_github_api_transport_errors_totalgithub_platform_operator_github_rate_limit_limitgithub_platform_operator_github_rate_limit_remaininggithub_platform_operator_github_rate_limit_reset_timestamp_secondsgithub_platform_operator_github_rate_limit_events_totalgithub_platform_operator_github_rate_limit_blocked_until_timestamp_secondsThe instrumentation is implemented at the shared GitHub HTTP transport layer so all controllers using the common GitHub client benefit from the same metrics without duplicating instrumentation in each reconciler.
Labels are intentionally kept low-cardinality and do not include repository names, usernames, organizations or tokens.
Grafana dashboard
Add a Grafana dashboard under:
dashboards/grafana/github-platform-operator.jsonThe dashboard combines the new GitHub-specific metrics with existing
controller-runtimemetrics and includes panels for:Tests
Add contract tests covering:
The existing metrics E2E test is also extended to verify that custom operator metrics are exposed through
/metrics.Validation