Lab 6: span error status, trace-id error correlation, windowed 5xx share alert

This commit is contained in:
Rakshasa2
2026-12-01 13:10:10 +03:00
parent dbce1eb574
commit 434e4b64a3
15 changed files with 467 additions and 38 deletions
+6
View File
@@ -184,6 +184,12 @@ func main() {
a := &app{pg: pg, s3: s3c, rdb: rdb, c: c, tracer: providers.Tracer, logger: logger}
initMetrics(a, providers)
// нулевые серии с момента старта: дашборд показывает 0, а не No data
a.jobsProcessed.Add(context.Background(), 0,
metric.WithAttributes(attribute.String("status", "done")))
a.jobsProcessed.Add(context.Background(), 0,
metric.WithAttributes(attribute.String("status", "failed")))
if err := rdb.XGroupCreateMkStream(ctx, c.stream, c.group, "0").Err(); err != nil &&
!strings.Contains(err.Error(), "BUSYGROUP") {
logger.Error("create group failed", "error", err)