Skip to content

Commit

Permalink
Merge branch 'main' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
JigarJoshi committed Aug 18, 2022
2 parents 8c236bf + fb91a42 commit 74a8a2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions server/config/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ type SearchMetricsConfig struct {
}

type ObservabilityConfig struct {
Provider string `yaml:"provider" json:"provider"`
EnableObservabilityService bool `yaml:"enable_observability_service" json:"enable_observability_service"`
ApiKey string `yaml:"api_key" json:"api_key"`
AppKey string `yaml:"app_key" json:"app_key"`
ProviderUrl string `yaml:"provider_url" json:"provider_url"`
Provider string `mapstructure:"provider" yaml:"provider" json:"provider"`
Enabled bool `mapstructure:"enabled" yaml:"enabled" json:"enabled"`
ApiKey string `mapstructure:"api_key" yaml:"api_key" json:"api_key"`
AppKey string `mapstructure:"app_key" yaml:"app_key" json:"app_key"`
ProviderUrl string `mapstructure:"provider_url" yaml:"provider_url" json:"provider_url"`
}

var DefaultConfig = Config{
Expand Down Expand Up @@ -152,7 +152,7 @@ var DefaultConfig = Config{
DataSizeLimit: 10000000000, // bytes
},
Observability: ObservabilityConfig{
EnableObservabilityService: false,
Enabled: false,
},
}

Expand Down
2 changes: 1 addition & 1 deletion server/services/v1/observability.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func newObservabilityService() *observabilityService {
}
}
log.Error().Str("observabilityProvider", config.DefaultConfig.Observability.Provider).Msg("Unable to configure external observability provider")
if config.DefaultConfig.Observability.EnableObservabilityService {
if config.DefaultConfig.Observability.Enabled {
panic("Unable to configure external observability provider")
}
return nil
Expand Down

0 comments on commit 74a8a2c

Please sign in to comment.