Draft: Add Kubearchive exporter#1054
Open
raks-tt wants to merge 9 commits into
Open
Conversation
a09a827 to
3674cfa
Compare
Add kubearchive exporter that reads archived PLR, Snapshot and Release resource from Kubearchive HTTP API and exposes the Konflux metrics
| labelBuildPipelineRun = "appstudio.openshift.io/build-pipelinerun" | ||
| labelAppStudioApp = "appstudio.openshift.io/application" | ||
| labelAppStudioComp = "appstudio.openshift.io/component" | ||
| // Used as an annotation on the build PLR after Snapshot creation; also a label on test PLRs. |
Contributor
There was a problem hiding this comment.
Suggested change
| // Used as an annotation on the build PLR after Snapshot creation; also a label on test PLRs. | |
| // Used as an annotation on the build PLR after Snapshot creation; also a label on test and release PLRs. |
Comment on lines
+213
to
+217
| type Condition struct { | ||
| Type string `json:"type"` | ||
| Status string `json:"status,omitempty"` | ||
| Reason string `json:"reason"` | ||
| } |
Contributor
There was a problem hiding this comment.
I think having the lastTransitionTime would be good as well, since it would give us the ability to even show the timings in between conditions like Released, Vlidated, ManagedPipelineProccessed, etc.
I do not mean in a way of "Let us use this info now, but let us collect it so that it will be easier to build a more granular system later.
| scrapeErrorsTotal *prometheus.CounterVec // labels: phase | ||
| lastScrapeSuccessGauge prometheus.Gauge // unix timestamp of last successful full scrape | ||
| scrapeDurationGauge prometheus.Gauge // last scrape wall-clock duration in seconds | ||
| truncationsTotal *prometheus.CounterVec // labels: resource (pipelineruns|snapshots|releases), namespace |
Contributor
There was a problem hiding this comment.
Not sure what this means "truncationsTotal". Would be worth a comment.
This fix also updates the queue wait time to wait time in the metric naming convention. Document the scrape interval in README.md Add test cases for race conidtion
Updated the func signatures to accept namespace as parameter. Change metric labels from baseURL to namespace.
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.
Add kubearchive exporter that reads archived PLR, Snapshot and Release resource from Kubearchive HTTP API and exposes the Konflux metrics
Description
Pre-Submission Checklist
CONTRIBUTING.md- specifically about the commit conventions and PR instructions - together with ourREADME.mdwhich explains contents of this repository with useful examples for contribution.Deployment Notice
Review
Once your PR is ready please let us know in the #forum-konflux-o11y slack channel. Tag
@konflux-o11y-icfor assistance.