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

Add configurable logger, metrics #223

Merged
merged 2 commits into from
Oct 12, 2021

Conversation

squeed
Copy link
Contributor

@squeed squeed commented Sep 6, 2021

This adds structured logging via the go-logr interface "standard".

This also adds some optional Prometheus metrics:
- number of update messages
- number of updates per table
- number of disconnects
- number of monitors

@coveralls
Copy link

coveralls commented Sep 6, 2021

Pull Request Test Coverage Report for Build 1333446488

  • 72 of 95 (75.79%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 73.001%

Changes Missing Coverage Covered Lines Changed/Added Lines %
client/client.go 21 23 91.3%
client/metrics.go 47 57 82.46%
client/options.go 4 15 26.67%
Totals Coverage Status
Change from base Build 1321747633: 0.2%
Covered Lines: 3999
Relevant Lines: 5478

💛 - Coveralls

@dave-tucker
Copy link
Collaborator

dave-tucker commented Sep 14, 2021

@squeed the logging changes look good, but I'm wondering whether perhaps we could split out the metrics changes and combine with #146 as that implements tracing too

Edit: PR is #189

This uses the go-logr/logr interface, which seems to be converging as
the community standard.

Signed-off-by: Casey Callendrello <cdc@redhat.com>
Adds the WithMetricsRegistry option and some useful metrics:
- number of update messages
- number of updates per table
- number of disconnects
- number of monitors

Signed-off-by: Casey Callendrello <cdc@redhat.com>
@dave-tucker
Copy link
Collaborator

rebased. if CI passes I'll pull this in.. will add some plumbing to bring logr to the cache/api layers and add some debug/trace level logging in another PR

@dave-tucker dave-tucker merged commit a0b5a41 into ovn-org:main Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants