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: move feature gates and set to be defined at startup level #45

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

leoparente
Copy link
Contributor

@leoparente leoparente commented Jan 29, 2025

This pull request includes several significant changes to the cmd/main.go, config/config.go, go.mod, otlpinf/otlpinf_test.go, otlpinf/server.go, and runner/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: Removed viper dependency and replaced the initConfig function with direct configuration assignment in the Run function. Added new flags for Set and FeatureGates. [1] [2]
  • config/config.go: Updated the Policy and Config structs to include Receivers, Processors, Exporters, Extensions, and Service fields. [1] [2]

Dependency Updates:

  • go.mod: Removed several indirect dependencies and added new ones, including github.com/google/go-cmp and github.com/kr/pretty. [1] [2]

Test Improvements:

Code Refactoring:

  • runner/runner.go: Modified the New function to accept a config.Config pointer instead of individual parameters. Updated the Configure method to handle the new Policy struct format. [1] [2]

Test Refactoring:

@leoparente leoparente self-assigned this Jan 29, 2025
Copy link

Go test coverage

STATUS ELAPSED PACKAGE COVER PASS FAIL SKIP
🟢 PASS 4.98s github.com/netboxlabs/opentelemetry-infinity/otlpinf 88.8% 4 0 0
🟢 PASS 3.13s github.com/netboxlabs/opentelemetry-infinity/runner 81.5% 5 0 0

Total coverage: 85.5%

@leoparente leoparente merged commit 816610b into main Jan 30, 2025
4 checks passed
@leoparente leoparente deleted the feat/move-config-to-startup-level branch January 30, 2025 13:57
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.

2 participants