feat(query-api): add richer stats and retention
This commit is contained in:
@@ -14,7 +14,9 @@ var validTypes = map[string]bool{
|
||||
"span.end": true,
|
||||
"error": true,
|
||||
"metric.snapshot": true,
|
||||
"openclaw.snapshot": true,
|
||||
"openclaw.snapshot": true,
|
||||
"swarm.snapshot": true,
|
||||
"swarm.service.snapshot": true,
|
||||
}
|
||||
|
||||
type ValidationError struct {
|
||||
@@ -62,7 +64,7 @@ func Validate(m map[string]any) error {
|
||||
}
|
||||
|
||||
// Source is optional for openclaw.snapshot events
|
||||
if eventType != "openclaw.snapshot" {
|
||||
if eventType != "openclaw.snapshot" && eventType != "swarm.snapshot" && eventType != "swarm.service.snapshot" {
|
||||
source, ok := event["source"].(map[string]any)
|
||||
if !ok {
|
||||
return ValidationError{Field: "event.source", Message: "missing or invalid"}
|
||||
|
||||
Reference in New Issue
Block a user