feat: move feature gates and set to be defined at startup level #45
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.
This pull request includes several significant changes to the
cmd/main.go
,config/config.go
,go.mod
,otlpinf/otlpinf_test.go
,otlpinf/server.go
, andrunner/runner.go
files. The changes focus on refactoring the configuration handling, updating dependencies, and improving test assertions. Below are the most important changes:Configuration Handling:
cmd/main.go
: Removedviper
dependency and replaced theinitConfig
function with direct configuration assignment in theRun
function. Added new flags forSet
andFeatureGates
. [1] [2]config/config.go
: Updated thePolicy
andConfig
structs to includeReceivers
,Processors
,Exporters
,Extensions
, andService
fields. [1] [2]Dependency Updates:
go.mod
: Removed several indirect dependencies and added new ones, includinggithub.com/google/go-cmp
andgithub.com/kr/pretty
. [1] [2]Test Improvements:
otlpinf/otlpinf_test.go
: Replaced error checks withassert
statements from thetestify
package to improve readability and consistency in test assertions. [1] [2] [3] [4] [5] [6] [7]Code Refactoring:
runner/runner.go
: Modified theNew
function to accept aconfig.Config
pointer instead of individual parameters. Updated theConfigure
method to handle the newPolicy
struct format. [1] [2]Test Refactoring:
runner/runner_test.go
: Updated tests to align with the newNew
function signature andPolicy
struct changes. [1] [2] [3] [4] [5]