mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Add debug logs in validateAndGetPrefix (#57002)
This commit is contained in:
parent
0dfd78c88c
commit
b0a927b138
@ -183,6 +183,7 @@ func (r *LotexRuler) validateAndGetPrefix(ctx *models.ReqContext) (string, error
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
// Validate URL
|
||||
if ds.Url == "" {
|
||||
return "", fmt.Errorf("URL for this data source is empty")
|
||||
@ -203,10 +204,14 @@ func (r *LotexRuler) validateAndGetPrefix(ctx *models.ReqContext) (string, error
|
||||
subtype := ctx.Query(subtypeQuery)
|
||||
subTypePrefix, ok := subtypeToPrefix[subtype]
|
||||
if !ok {
|
||||
r.log.Debug("unable to determine prometheus datasource subtype, using default prefix", "subtype", subtype)
|
||||
r.log.Debug(
|
||||
"unable to determine prometheus datasource subtype, using default prefix",
|
||||
"datasource", ds.Uid, "datasource_type", ds.Type, "subtype", subtype, "prefix", prefix)
|
||||
return prefix, nil
|
||||
}
|
||||
|
||||
r.log.Debug("determined prometheus datasource subtype",
|
||||
"datasource", ds.Uid, "datasource_type", ds.Type, "subtype", subtype)
|
||||
return subTypePrefix, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user