Add exprimental flag for OTLP logs integration

This commit is contained in:
Kevin Pollet 2024-12-12 12:22:05 +01:00 committed by GitHub
parent 26738cbf93
commit d953ee69b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 63 additions and 4 deletions

View file

@ -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")
}