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

feat: Add informer metrics #209

Merged
merged 2 commits into from
Nov 1, 2024
Merged

feat: Add informer metrics #209

merged 2 commits into from
Nov 1, 2024

Conversation

jannfis
Copy link
Collaborator

@jannfis jannfis commented Oct 30, 2024

This PR adds metrics to the generic informer, conveniently handled within the callbacks.

Additionally, it adds some unit tests for the informer package.

The next step will move the existing application informer to use the generic informer, too.

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 42.85714% with 84 lines in your changes missing coverage. Please review.

Project coverage is 47.01%. Comparing base (61613f0) to head (1311be9).

Files with missing lines Patch % Lines
internal/informer/appproject/projectinformer.go 61.42% 21 Missing and 6 partials ⚠️
internal/informer/informer.go 8.33% 18 Missing and 4 partials ⚠️
internal/metrics/metrics.go 0.00% 22 Missing ⚠️
internal/manager/application/application.go 0.00% 5 Missing ⚠️
internal/metrics/server.go 70.58% 3 Missing and 2 partials ⚠️
internal/manager/appproject/appproject.go 0.00% 2 Missing ⚠️
principal/server.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
+ Coverage   46.99%   47.01%   +0.02%     
==========================================
  Files          57       57              
  Lines        4886     4956      +70     
==========================================
+ Hits         2296     2330      +34     
- Misses       2413     2444      +31     
- Partials      177      182       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jannfis jannfis force-pushed the feat/informer-metrics branch 2 times, most recently from 913d7e8 to 2fbc2de Compare October 30, 2024 16:03
Comment on lines -86 to -90
- name: Restore go build cache
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Cache was not used anyway.

Comment on lines -107 to -111
- name: Restore go build cache
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Cache was not used anyway

@jannfis jannfis marked this pull request as ready for review October 31, 2024 13:17
Copy link
Collaborator

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

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

Lgtm!!

@jannfis jannfis merged commit 46b9eea into main Nov 1, 2024
11 checks passed
@jannfis jannfis deleted the feat/informer-metrics branch November 1, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants