mirror of
https://github.com/hanzoai/insights.git
synced 2026-11-03 00:52:32 +00:00
The tree was a debranded snapshot of upstream taken around 2026-02-20, and upstream has moved about five months since. This replaces it with upstream master, mechanically re-derived: bin/debrand does the rename, and the pipeline and squashed migrations are restored from the shipped tree. Not a merge. The previous import replaced the tree wholesale in a single commit, so there is no shared content history to merge against. Reproducing the rename on the new tree is what actually converges. What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints, compose files, LLM.md, and insights/migrations. The squashed initial migration is load-bearing — the live database records it by name, so upstream's ~918 individual migrations cannot come back. Nine products are dropped as unreferenced. Twenty-one more that we do not run are kept anyway because the core app still imports them; unpicking those is a refactor and does not belong in a rebase. This base does not build yet, and the reasons are not in the rename: upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against our 4.2, and the dependency manifests still name upstream packages that we republish under our own names. Those are decisions, not renames.
114 lines
6.0 KiB
JSON
114 lines
6.0 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"properties": {
|
|
"query": {
|
|
"description": "The bucketed-count query to execute.",
|
|
"properties": {
|
|
"dateRange": {
|
|
"description": "Window to bucket. Defaults to last hour. Use a bucket's date_from/date_to from a prior response to recursively narrow into a sub-range.",
|
|
"properties": {
|
|
"date_from": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Start of the date range. Accepts ISO 8601 timestamps or relative formats: -7d, -1h, -1mStart, etc."
|
|
},
|
|
"date_to": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "End of the date range. Same format as date_from. Omit or null for \"now\"."
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"filterGroup": {
|
|
"description": "Property filters applied before bucketing. Same shape as `query-logs`.",
|
|
"items": {
|
|
"properties": {
|
|
"key": {
|
|
"description": "Attribute key. For type \"log\", use \"message\". For \"log_attribute\"/\"log_resource_attribute\", use the attribute key (e.g. \"k8s.container.name\").",
|
|
"type": "string"
|
|
},
|
|
"operator": {
|
|
"description": "Comparison operator.\n\n* `exact` - exact\n* `is_not` - is_not\n* `icontains` - icontains\n* `not_icontains` - not_icontains\n* `starts_with` - starts_with\n* `not_starts_with` - not_starts_with\n* `ends_with` - ends_with\n* `not_ends_with` - not_ends_with\n* `regex` - regex\n* `not_regex` - not_regex\n* `gt` - gt\n* `lt` - lt\n* `is_date_exact` - is_date_exact\n* `is_date_before` - is_date_before\n* `is_date_after` - is_date_after\n* `is_set` - is_set\n* `is_not_set` - is_not_set",
|
|
"enum": [
|
|
"exact",
|
|
"is_not",
|
|
"icontains",
|
|
"not_icontains",
|
|
"starts_with",
|
|
"not_starts_with",
|
|
"ends_with",
|
|
"not_ends_with",
|
|
"regex",
|
|
"not_regex",
|
|
"gt",
|
|
"lt",
|
|
"is_date_exact",
|
|
"is_date_before",
|
|
"is_date_after",
|
|
"is_set",
|
|
"is_not_set"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"description": "\"log\" filters the log body/message. \"log_attribute\" filters log-level attributes. \"log_resource_attribute\" filters resource-level attributes.\n\n* `log` - log\n* `log_attribute` - log_attribute\n* `log_resource_attribute` - log_resource_attribute",
|
|
"enum": ["log", "log_attribute", "log_resource_attribute"],
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"description": "Value to compare against. String, number, or array of strings. Omit for is_set/is_not_set operators."
|
|
}
|
|
},
|
|
"required": ["key", "type", "operator"],
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"searchTerm": {
|
|
"description": "Full-text search across log bodies. Applied before bucketing.",
|
|
"type": "string"
|
|
},
|
|
"serviceNames": {
|
|
"description": "Filter by service names. Applied before bucketing.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"severityLevels": {
|
|
"description": "Filter by log severity levels. Applied before bucketing.",
|
|
"items": {
|
|
"description": "* `trace` - trace\n* `debug` - debug\n* `info` - info\n* `warn` - warn\n* `error` - error\n* `fatal` - fatal",
|
|
"enum": ["trace", "debug", "info", "warn", "error", "fatal"],
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"targetBuckets": {
|
|
"default": 10,
|
|
"description": "Approximate number of buckets to return. The bucket interval is picked adaptively from a fixed list (1/5/10s, 1/2/5/10/15/30/60/120/240/360/720/1440m) to land near this target. Defaults to 10, capped at 100.",
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"type": "number"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": ["query"],
|
|
"type": "object"
|
|
}
|