Chore: Add deprecation warnings for Sentry (#60165)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package setting
|
||||
|
||||
import "github.com/go-kit/kit/log/level"
|
||||
|
||||
type Sentry struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
DSN string `json:"dsn"`
|
||||
@@ -13,6 +15,7 @@ func (cfg *Cfg) readSentryConfig() {
|
||||
raw := cfg.Raw.Section("log.frontend")
|
||||
provider := raw.Key("provider").MustString("sentry")
|
||||
if provider == "sentry" || provider != "grafana" {
|
||||
_ = level.Warn(cfg.Logger).Log("msg", "\"sentry\" frontend logging provider is deprecated and will be removed in the next major version. Use \"grafana\" provider instead.")
|
||||
cfg.Sentry = Sentry{
|
||||
Enabled: raw.Key("enabled").MustBool(true),
|
||||
DSN: raw.Key("sentry_dsn").String(),
|
||||
|
||||
Reference in New Issue
Block a user