mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-13 03:09:06 +08:00
fix: make label compliant with prometheus spec (#4488)
This commit is contained in:
parent
00b111fbe3
commit
8fe0e60208
@ -1057,12 +1057,12 @@ func (r *ThresholdRule) Eval(ctx context.Context, ts time.Time, queriers *Querie
|
|||||||
if r.typ == "TRACES_BASED_ALERT" {
|
if r.typ == "TRACES_BASED_ALERT" {
|
||||||
link := r.prepareLinksToTraces(ts, smpl.Metric)
|
link := r.prepareLinksToTraces(ts, smpl.Metric)
|
||||||
if link != "" && r.hostFromSource() != "" {
|
if link != "" && r.hostFromSource() != "" {
|
||||||
lb.Set("See related traces: ", fmt.Sprintf("%s/traces-explorer?%s", r.hostFromSource(), link))
|
lb.Set("RelatedTraces", fmt.Sprintf("%s/traces-explorer?%s", r.hostFromSource(), link))
|
||||||
}
|
}
|
||||||
} else if r.typ == "LOGS_BASED_ALERT" {
|
} else if r.typ == "LOGS_BASED_ALERT" {
|
||||||
link := r.prepareLinksToLogs(ts, smpl.Metric)
|
link := r.prepareLinksToLogs(ts, smpl.Metric)
|
||||||
if link != "" && r.hostFromSource() != "" {
|
if link != "" && r.hostFromSource() != "" {
|
||||||
lb.Set("See related logs: ", fmt.Sprintf("%s/logs/logs-explorer?%s", r.hostFromSource(), link))
|
lb.Set("RelatedLogs", fmt.Sprintf("%s/logs/logs-explorer?%s", r.hostFromSource(), link))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user