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

refactor: replace glog in metrics & telemetry packages #6587

Merged
merged 5 commits into from
Oct 7, 2024

Conversation

pdabelf5
Copy link
Collaborator

@pdabelf5 pdabelf5 commented Oct 3, 2024

Proposed changes

Replace glog with slog in metrics & telemetry packages for:

  • metrics/collectors/latency.go
  • metrics/collectors/processes.go
  • metrics/listener.go
  • metrics/syslog_listener.go
  • telemetry/collector.go

NOTE:

GLog Levels Slog Levels
glog.V(3).Infof() log.Debugf()
glog.V(3).Info() log.Debug()
glog.V(2).Infof() log.Debugf()
glog.V(2).Info() log.Debugf()
glog.Infof() log.Infof()
glog.Info() log.Info()
glog.Warningf() log.Warnf()
glog.Warning() log.Warn()
glog.Errorf() log.Errorf()
glog.Error() log.Error()
glog.Fatalf() log.Fatalf()
glog.Fatal() log.Fatal()

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@pdabelf5 pdabelf5 requested a review from a team as a code owner October 3, 2024 15:39
@github-actions github-actions bot added the go Pull requests that update Go code label Oct 3, 2024
@AlexFenlon
Copy link
Contributor

AlexFenlon commented Oct 4, 2024

nil pointer for tests in collector_test.go - specifically anything that uses CollectorConfig

so please add "Context: context.Background(), " to each CollectorConfig to fix this issue.

Just needs to be updated with some recent changes from main - will do soon.

@AlexFenlon AlexFenlon mentioned this pull request Oct 4, 2024
16 tasks
@AlexFenlon AlexFenlon added the skip changelog Pull requests that don't need to be added to the changelog label Oct 4, 2024
@AlexFenlon AlexFenlon assigned AlexFenlon and unassigned AlexFenlon Oct 7, 2024
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 18.75000% with 39 lines in your changes missing coverage. Please review.

Project coverage is 53.24%. Comparing base (62642a5) to head (22d2bc5).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/metrics/listener.go 0.00% 13 Missing ⚠️
internal/metrics/syslog_listener.go 0.00% 7 Missing ⚠️
internal/telemetry/collector.go 60.00% 6 Missing ⚠️
cmd/nginx-ingress/main.go 0.00% 5 Missing ⚠️
internal/metrics/collectors/latency.go 0.00% 5 Missing ⚠️
internal/metrics/collectors/processes.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6587      +/-   ##
==========================================
- Coverage   53.28%   53.24%   -0.04%     
==========================================
  Files          87       87              
  Lines       16255    16262       +7     
==========================================
- Hits         8661     8659       -2     
- Misses       7181     7188       +7     
- Partials      413      415       +2     

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

@AlexFenlon AlexFenlon merged commit 5b06b2c into main Oct 7, 2024
81 checks passed
@AlexFenlon AlexFenlon deleted the refactor-glog-metrics branch October 7, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code skip changelog Pull requests that don't need to be added to the changelog
Projects
Status: Done 🚀
Development

Successfully merging this pull request may close these issues.

5 participants