Skip to content

processor/healthcheckextension: migrate feature gate to mdatagen#47526

Merged
mx-psi merged 2 commits into
open-telemetry:mainfrom
ogulcanaydogan:refactor/46116-migrate-featuregate-healthcheckextension
Apr 10, 2026
Merged

processor/healthcheckextension: migrate feature gate to mdatagen#47526
mx-psi merged 2 commits into
open-telemetry:mainfrom
ogulcanaydogan:refactor/46116-migrate-featuregate-healthcheckextension

Conversation

@ogulcanaydogan

Copy link
Copy Markdown
Contributor

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 #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.

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
@github-actions github-actions Bot added the extension/healthcheck Health Check Extension label Apr 10, 2026
@mx-psi mx-psi merged commit e1b9c69 into open-telemetry:main Apr 10, 2026
314 of 315 checks passed
@otelbot

otelbot Bot commented Apr 10, 2026

Copy link
Copy Markdown
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension/healthcheck Health Check Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants