Component evidence

Feature Gate Flag Registration (featuregate/flag.go)

opentelemetry-collector · featuregate/flag.go · go · Apache-2.0
dev-toolsanalyticsinfraclilang:gotag:configuration

Registers command-line flags for enabling/disabling feature gates in OpenTelemetry Collector via comma-delimited identifiers.

Source preview first 800 characters · full source over MCP
// Source: https://github.com/open-telemetry/opentelemetry-collector | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package featuregate // import "go.opentelemetry.io/collector/featuregate"

import (
	"flag"
	"fmt"
	"strings"

	"go.uber.org/multierr"
)

const (
	featureGatesFlag            = "feature-gates"
	featureGatesFlagDescription = "Comma-delimited list of feature gate identifiers. Prefix with '-' to disable the feature. '+' or no prefix will enable the feature."
)

// RegisterFlagsOption is an option for RegisterFlags.
type RegisterFlagsOption interface {
	private()
}

// RegisterFlags that dire

... (truncated -- full source via MCP)