Add exprimental flag for OTLP logs integration
This commit is contained in:
parent
26738cbf93
commit
d953ee69b4
9 changed files with 63 additions and 4 deletions
|
@ -7,8 +7,8 @@ type Experimental struct {
|
|||
Plugins map[string]plugins.Descriptor `description:"Plugins configuration." json:"plugins,omitempty" toml:"plugins,omitempty" yaml:"plugins,omitempty" export:"true"`
|
||||
LocalPlugins map[string]plugins.LocalDescriptor `description:"Local plugins configuration." json:"localPlugins,omitempty" toml:"localPlugins,omitempty" yaml:"localPlugins,omitempty" export:"true"`
|
||||
AbortOnPluginFailure bool `description:"Defines whether all plugins must be loaded successfully for Traefik to start." json:"abortOnPluginFailure,omitempty" toml:"abortOnPluginFailure,omitempty" yaml:"abortOnPluginFailure,omitempty" export:"true"`
|
||||
|
||||
FastProxy *FastProxyConfig `description:"Enable the FastProxy implementation." json:"fastProxy,omitempty" toml:"fastProxy,omitempty" yaml:"fastProxy,omitempty" label:"allowEmpty" file:"allowEmpty" export:"true"`
|
||||
FastProxy *FastProxyConfig `description:"Enables the FastProxy implementation." json:"fastProxy,omitempty" toml:"fastProxy,omitempty" yaml:"fastProxy,omitempty" label:"allowEmpty" file:"allowEmpty" export:"true"`
|
||||
OTLPLogs bool `description:"Enables the OpenTelemetry logs integration." json:"otlplogs,omitempty" toml:"otlplogs,omitempty" yaml:"otlplogs,omitempty" export:"true"`
|
||||
|
||||
// Deprecated: KubernetesGateway provider is not an experimental feature starting with v3.1. Please remove its usage from the static configuration.
|
||||
KubernetesGateway bool `description:"(Deprecated) Allow the Kubernetes gateway api provider usage." json:"kubernetesGateway,omitempty" toml:"kubernetesGateway,omitempty" yaml:"kubernetesGateway,omitempty" export:"true"`
|
||||
|
|
|
@ -387,12 +387,20 @@ func (c *Configuration) ValidateConfiguration() error {
|
|||
}
|
||||
|
||||
if c.AccessLog != nil && c.AccessLog.OTLP != nil {
|
||||
if c.Experimental == nil || !c.Experimental.OTLPLogs {
|
||||
return errors.New("the experimental OTLPLogs feature must be enabled to use OTLP access logging")
|
||||
}
|
||||
|
||||
if c.AccessLog.OTLP.GRPC != nil && c.AccessLog.OTLP.GRPC.TLS != nil && c.AccessLog.OTLP.GRPC.Insecure {
|
||||
return errors.New("access logs OTLP GRPC: TLS and Insecure options are mutually exclusive")
|
||||
}
|
||||
}
|
||||
|
||||
if c.Log != nil && c.Log.OTLP != nil {
|
||||
if c.Experimental == nil || !c.Experimental.OTLPLogs {
|
||||
return errors.New("the experimental OTLPLogs feature must be enabled to use OTLP logging")
|
||||
}
|
||||
|
||||
if c.Log.OTLP.GRPC != nil && c.Log.OTLP.GRPC.TLS != nil && c.Log.OTLP.GRPC.Insecure {
|
||||
return errors.New("logs OTLP GRPC: TLS and Insecure options are mutually exclusive")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue