From 57cb66b9b1b005f35be11f29fdcf769efb66dc2d Mon Sep 17 00:00:00 2001 From: "red-hat-konflux-kflux-prd-rh02[bot]" <190377777+red-hat-konflux-kflux-prd-rh02[bot]@users.noreply.github.com> Date: Sat, 27 Jun 2026 00:40:37 +0000 Subject: [PATCH] Update module go.opentelemetry.io/collector/featuregate to v1.61.0 Signed-off-by: red-hat-konflux-kflux-prd-rh02 <190377777+red-hat-konflux-kflux-prd-rh02[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 +-- .../collector/featuregate/README.md | 33 +++++++++++++------ .../collector/featuregate/gate.go | 3 +- vendor/modules.txt | 2 +- 5 files changed, 29 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index e3f660eb1..38a26ab5f 100644 --- a/go.mod +++ b/go.mod @@ -170,7 +170,7 @@ require ( go.opentelemetry.io/collector/confmap v1.56.0 // indirect go.opentelemetry.io/collector/confmap/xconfmap v0.150.0 // indirect go.opentelemetry.io/collector/consumer v1.56.0 // indirect - go.opentelemetry.io/collector/featuregate v1.56.0 // indirect + go.opentelemetry.io/collector/featuregate v1.61.0 // indirect go.opentelemetry.io/collector/internal/componentalias v0.150.0 // indirect go.opentelemetry.io/collector/pdata v1.56.0 // indirect go.opentelemetry.io/collector/pipeline v1.56.0 // indirect diff --git a/go.sum b/go.sum index 49f9dee7a..bca18a4d0 100644 --- a/go.sum +++ b/go.sum @@ -523,8 +523,8 @@ go.opentelemetry.io/collector/consumer/consumertest v0.150.0 h1:DQtVy0BUTQqHKKOy go.opentelemetry.io/collector/consumer/consumertest v0.150.0/go.mod h1:2mgIllFOgoq+SQ7QfXzaZn65pa6OZWobcy3yj+Ik9Ug= go.opentelemetry.io/collector/consumer/xconsumer v0.150.0 h1:URO73bAV00wTH9bJeloqaiLgS3Q80GNci+nm1iZ3W6Q= go.opentelemetry.io/collector/consumer/xconsumer v0.150.0/go.mod h1:BMcOInfcRUpVZ2R4qa3vNglvU6mWL+0dhAayH87YSB8= -go.opentelemetry.io/collector/featuregate v1.56.0 h1:NjcbOZkdCSXddAJmFLdO+pv1gmAgrU6sC5PBga2KlKI= -go.opentelemetry.io/collector/featuregate v1.56.0/go.mod h1:4ga1QBMPEejXXmpyJS8lmaRpknJ3Lb9Bvk6e420bUFU= +go.opentelemetry.io/collector/featuregate v1.61.0 h1:XtnQ/XPHLmw9zgg4Cjq/f0rgdqn7z1M10wnmGhgNbYk= +go.opentelemetry.io/collector/featuregate v1.61.0/go.mod h1:4ga1QBMPEejXXmpyJS8lmaRpknJ3Lb9Bvk6e420bUFU= go.opentelemetry.io/collector/internal/componentalias v0.150.0 h1:qvcJr0m/fFgsc3x6Oya3RNDOZp/WyfmOKIv9jtvoLYw= go.opentelemetry.io/collector/internal/componentalias v0.150.0/go.mod h1:abuQP8ELgPpCSq6xbHM1b2hPOGqaKxUeLgHHdU/XGP0= go.opentelemetry.io/collector/internal/testutil v0.150.0 h1:J4PLQGPfbLVaL5eI1aMc0m0TMixV9wzBhNhoHU00J0I= diff --git a/vendor/go.opentelemetry.io/collector/featuregate/README.md b/vendor/go.opentelemetry.io/collector/featuregate/README.md index 11eaab166..812e296e0 100644 --- a/vendor/go.opentelemetry.io/collector/featuregate/README.md +++ b/vendor/go.opentelemetry.io/collector/featuregate/README.md @@ -6,25 +6,36 @@ be able to govern the behavior of the application starting as early as possible and should be available to every component such that decisions may be made based on flags at the component level. -## Usage +## Defining Feature Gates -### With mdatagen +### Declaratively in `metadata.yaml` (Recommended) -In components that use mdatagen, feature gates should be defined in the -component's `metadata.yml`. +The preferred way to define feature gates is declaratively in the component's +`metadata.yaml` file. The `mdatagen` code generator will automatically register +the gate and generate the necessary Go code. ```yaml feature_gates: - id: namespaced.uniqueIdentifier description: A brief description of what the gate controls - stage: stable + stage: alpha from_version: 'v0.65.0' reference_url: 'https://github.com/open-telemetry/opentelemetry-collector/issues/6167' ``` -Running the mdatagen code generator with this configuration will initialize the -feature flag in the `internal/metadata` submodule. -The status of the gate can later be checked by calling that submodule: +The supported fields are: + +| Field | Required | Description | +|-------|----------|-------------| +| `id` | Yes | Unique identifier for the feature gate | +| `description` | Yes | Brief description of what the gate controls | +| `stage` | Yes | Lifecycle stage: `alpha`, `beta`, `stable`, or `deprecated` | +| `from_version` | Yes | Version when the feature gate was introduced | +| `to_version` | For `stable`/`deprecated` | Version when the gate reached its current stage | +| `reference_url` | Yes | URL with contextual information (issue or PR) | + +Running `mdatagen` will generate the gate registration in the `internal/metadata` +submodule. The status of the gate can then be checked in code: ```go if metadata.NamespacedUniqueIdentifierFeatureGate.IsEnabled() { @@ -32,9 +43,11 @@ if metadata.NamespacedUniqueIdentifierFeatureGate.IsEnabled() { } ``` -### In code +See the [mdatagen documentation](../cmd/mdatagen/README.md) for more details. + +### Programmatically in code -In components that don't use mdatagen, feature gates can be defined and +For packages that don't use `mdatagen`, feature gates can be defined and registered with the global registry in an `init()` function. This makes the `Gate` available to be configured and queried with the defined [`Stage`](#feature-lifecycle) default value. diff --git a/vendor/go.opentelemetry.io/collector/featuregate/gate.go b/vendor/go.opentelemetry.io/collector/featuregate/gate.go index a250ceb9a..1a2bab916 100644 --- a/vendor/go.opentelemetry.io/collector/featuregate/gate.go +++ b/vendor/go.opentelemetry.io/collector/featuregate/gate.go @@ -52,7 +52,8 @@ func (g *Gate) FromVersion() string { return fmt.Sprintf("v%s", g.fromVersion) } -// ToVersion returns the version information when Gate's in StageStable. +// ToVersion returns the version information when Gate will be removed. +// For Stable and Deprecated stages, this is the last Collector release where this gate can be used. func (g *Gate) ToVersion() string { return fmt.Sprintf("v%s", g.toVersion) } diff --git a/vendor/modules.txt b/vendor/modules.txt index b203638da..d0af8f622 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -915,7 +915,7 @@ go.opentelemetry.io/collector/confmap/xconfmap ## explicit; go 1.25.0 go.opentelemetry.io/collector/consumer go.opentelemetry.io/collector/consumer/internal -# go.opentelemetry.io/collector/featuregate v1.56.0 +# go.opentelemetry.io/collector/featuregate v1.61.0 ## explicit; go 1.25.0 go.opentelemetry.io/collector/featuregate # go.opentelemetry.io/collector/internal/componentalias v0.150.0