Hanzo Logs is a horizontally-scalable, multi-tenant log aggregation system for Hanzo infrastructure.
Category: Hanzo Ecosystem Related Skills: hanzo/hanzo-metrics.md, hanzo/hanzo-o11y.md, hanzo/hanzo-universe.md
Hanzo Logs is a horizontally-scalable, multi-tenant log aggregation system for Hanzo infrastructure. Fork of Grafana Loki. Written in Go. Indexes labels (not full text) for cost-effective log storage and querying via LogQL (Prometheus-inspired query language). Integrates natively with Grafana.
github.com/grafana/loki/v3 (upstream module path, not yet rebranded)Fork of github.com/grafana/loki. Repo: hanzoai/logs.
| Item | Value | |------|-------| | Repo | github.com/hanzoai/logs | | Language | Go | | Go Module | github.com/grafana/loki/v3 | | Default branch | main | | License | AGPL-3.0-only | | Default port | 3100 (HTTP), 9096 (gRPC) |
Built from cmd/:
| Binary | Purpose | |--------|---------| | loki | Log aggregation server | | logcli | CLI for querying logs | | loki-canary | End-to-end logging pipeline test tool | | lokitool | Operational tooling (migration, inspection) | | querytee | Query comparison proxy | | chunks-inspect | Chunk data inspector | | dataobj-inspect | Data object inspector | | logql-analyzer | LogQL query analyzer |
# Build all binaries
make all
# Build individual binaries
make loki
make logcli
# Run tests
make test
go test ./...
# Single package test
go test -v ./pkg/logql/...
# Integration tests
make test-integration
# Linting
make lint
# Formatting
make format
Write path: distributor -> ingester -> storage
Read path: query-frontend -> querier -> storage
cmd/ # Binary entry points
pkg/ # All library code
logql/ # LogQL query engine
ingester/ # Log ingestion
distributor/ # Write path distribution
compactor/ # Index compaction
querier/ # Read path
storage/ # Storage backends
chunkenc/ # Chunk encoding
kafka/ # Kafka integration
bloomgateway/ # Bloom filter gateway
engine/ # Query engine
ui/frontend/ # Vite-based UI (TypeScript)
clients/ # Log shipping clients (Promtail)
cmd/ # Client binaries
pkg/ # Client libraries
operator/ # Kubernetes operator (separate Go module)
production/ # Deployment configs
docker/ # Docker configs
helm/ # Helm charts
ksonnet/ # Ksonnet/jsonnet manifests
nomad/ # Nomad jobs
terraform/ # Terraform configs
docs/ # Documentation source
integration/ # Integration tests
The operator/ directory contains a separate Go module with a full K8s operator for managing Loki deployments, including CRDs, controllers, and OLM bundle.
Vite-based TypeScript UI in pkg/ui/frontend/:
cd pkg/ui/frontend
make build # Build
make dev # Dev server
make lint # Lint
make test # Tests
Production configs in production/:
production/docker-compose.yaml)production/helm/)# Build and run with local config
go build ./cmd/loki
./loki -config.file=./cmd/loki/loki-local-config.yaml
make loki
./loki -config.file=./cmd/loki/loki-local-multi-tenant-config.yaml \
-runtime-config.file=./cmd/loki/loki-overrides.yaml
<type>: messagehanzo/hanzo-metrics.md - Time-series metrics (VictoriaMetrics fork)hanzo/hanzo-o11y.md - Observability overviewhanzo/hanzo-universe.md - Production K8s infrastructureLast Updated: 2026-03-13 Category: Hanzo Ecosystem Related: logging, observability, loki, logql, grafana Prerequisites: Go, object storage, Grafana