Revise observability features by introducing new health and liveness endpoints (/livez and /readyz), updating Prometheus metrics to track NATS consumer pending messages, and enhancing telemetry integration for better monitoring. Update documentation to reflect these changes and ensure consistency in metric naming conventions.

This commit is contained in:
windyboy
2025-11-16 13:14:46 +08:00
parent 3d8572a69f
commit e27328378a
17 changed files with 582 additions and 154 deletions
+3 -2
View File
@@ -9,6 +9,7 @@ import (
"caatsm/internal/adapter"
"caatsm/internal/adapter/parser"
"caatsm/internal/model"
"caatsm/internal/observability/telemetry"
"github.com/google/uuid"
. "github.com/onsi/ginkgo/v2"
@@ -121,7 +122,7 @@ var _ = Describe("MessageProcessor", func() {
},
err: errors.New("parse failure"),
}
proc = NewMessageProcessor(parserStub, repo, pub, logger)
proc = NewMessageProcessor(parserStub, repo, pub, telemetry.NewNoop(), logger)
err := proc.Handle(ctx, []byte("raw"), "msg-6")
Expect(err).To(HaveOccurred())
@@ -145,7 +146,7 @@ var _ = Describe("MessageProcessor", func() {
})
func newTestProcessor(p parser.Parser, repo adapter.Repository, pub adapter.Publisher) *MessageProcessor {
return NewMessageProcessor(p, repo, pub, zap.NewNop())
return NewMessageProcessor(p, repo, pub, telemetry.NewNoop(), zap.NewNop())
}
type stubParser struct {