processor/healthcheckextension: migrate feature gate to mdatagen#47526
Merged
mx-psi merged 2 commits intoApr 10, 2026
Conversation
Moves the extension.healthcheck.useComponentStatus feature gate registration from manual featuregate.GlobalRegistry().MustRegister() in factory.go to the metadata.yaml feature_gates section, allowing mdatagen to generate internal/metadata/generated_feature_gates.go. Removes the forbidigo linter exclusion from .golangci.yml now that the manual registration is gone. Part of open-telemetry#46116 Assisted-by: Claude Sonnet 4.6
mx-psi
approved these changes
Apr 10, 2026
Contributor
|
Thank you for your contribution @ogulcanaydogan! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. If you are getting started contributing, you can also join the CNCF Slack channel #opentelemetry-new-contributors to ask for guidance and get help. |
AndrewCharlesHay
pushed a commit
to AndrewCharlesHay/opentelemetry-collector-contrib
that referenced
this pull request
Apr 23, 2026
…n-telemetry#47526) This PR migrates the `extension.healthcheck.useComponentStatus` feature gate in `extension/healthcheckextension` from manual `featuregate.GlobalRegistry().MustRegister()` to `metadata.yaml` for mdatagen code generation, as part of open-telemetry#46116. **Changes:** - Added `feature_gates:` section to `metadata.yaml` - Ran `go generate ./...` to produce `internal/metadata/generated_feature_gates.go` and update `documentation.md` - Removed the manual `MustRegister` block from `factory.go`; updated `factory.go` and `config.go` to use `metadata.ExtensionHealthcheckUseComponentStatusFeatureGate` - Updated `factory_test.go`, `integration_test.go`, and `config_test.go` to reference the generated gate variable - Removed the `forbidigo` lint exclusion for this package from `.golangci.yml` **Testing:** - `go build ./...` passes - `go test ./...` passes Note: The original `factory.go` registration included `WithRegisterToVersion("v0.147.0")`, but `mdatagen` does not support `to_version` for alpha-stage gates. This field has been dropped; the gate behavior is otherwise identical.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR migrates the
extension.healthcheck.useComponentStatusfeature gate inextension/healthcheckextensionfrom manualfeaturegate.GlobalRegistry().MustRegister()tometadata.yamlfor mdatagen code generation, as part of #46116.Changes:
feature_gates:section tometadata.yamlgo generate ./...to produceinternal/metadata/generated_feature_gates.goand updatedocumentation.mdMustRegisterblock fromfactory.go; updatedfactory.goandconfig.goto usemetadata.ExtensionHealthcheckUseComponentStatusFeatureGatefactory_test.go,integration_test.go, andconfig_test.goto reference the generated gate variableforbidigolint exclusion for this package from.golangci.ymlTesting:
go build ./...passesgo test ./...passesNote: The original
factory.goregistration includedWithRegisterToVersion("v0.147.0"), butmdatagendoes not supportto_versionfor alpha-stage gates. This field has been dropped; the gate behavior is otherwise identical.