Skip to content

Conversation

alexandernorth
Copy link
Contributor

In order to help with observability, this PR migrates the existing logging framework to a logr.Logger based one, which is passed to various functions through the context.
This has the advantage that fields can be added to the logger as the application proceeds, adding relevant context to the log output and grouping together messages which belong to the same request/goroutine/...
It is also using structured logging which can help when integrating logs into observability tools.

This also refactors the netconf set function to have only one version of the code to handle setting to running or candidate stores, rather than two separate functions

@alexandernorth alexandernorth force-pushed the feature/logging-refactoring branch 3 times, most recently from 451677d to cfbba53 Compare June 23, 2025 10:40
@alexandernorth alexandernorth force-pushed the feature/logging-refactoring branch from 4553963 to 7f5e67a Compare September 29, 2025 11:32
@alexandernorth alexandernorth force-pushed the feature/logging-refactoring branch from bf6e4c4 to c875f90 Compare September 29, 2025 11:57
@alexandernorth alexandernorth force-pushed the feature/logging-refactoring branch from c875f90 to c12e5ac Compare September 29, 2025 12:00
@alexandernorth alexandernorth marked this pull request as ready for review October 1, 2025 17:27
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

❌ Patch coverage is 7.50469% with 493 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/server/schema.go 0.00% 94 Missing ⚠️
pkg/server/datastore.go 0.00% 50 Missing ⚠️
pkg/server/server.go 0.00% 48 Missing ⚠️
pkg/datastore/target/nc.go 9.61% 47 Missing ⚠️
pkg/datastore/datastore_rpc.go 0.00% 46 Missing ⚠️
pkg/datastore/transaction_rpc.go 0.00% 37 Missing ⚠️
pkg/server/transaction.go 0.00% 32 Missing ⚠️
pkg/utils/leaf_convert.go 0.00% 20 Missing ⚠️
pkg/datastore/target/gnmi.go 0.00% 18 Missing ⚠️
pkg/server/intent.go 0.00% 16 Missing ⚠️
... and 20 more

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant