mirror of
https://github.com/hanzoai/o11y.git
synced 2026-10-30 14:56:15 +00:00
* feat: cloud Mount() per HIP-0106 Adds pkg/o11y.Mount(*zip.App, cloud.Deps) so the unified cloud binary serves o11y under /v1/o11y. The route layer adapts the existing gorilla/mux handler via zip.AdaptNetHTTP and a SetHandler injector — standalone cmd/server and the embedded cloud orchestrator share the same registered http.Handler. Also resolves pre-existing build breaks blocking the runtime: - Brand cleanup: rebrand half-migrated signoz* imports to o11y* across pkg/o11y, pkg/alertmanager/o11yalertmanager, pkg/apiserver/o11yapiserver, pkg/global/o11yglobal, pkg/query-service/rules. Three scoped-provider settings strings also lose the leak. - Stub packages pkg/billing and pkg/types/billingtypes so the community build links cleanly; enterprise replaces both. - go.mod tidy picks up the gosaml2 / goxmldsig / gocron deps the ee tree actually uses. Adds schema/o11y.zap describing the typed ZAP surface (counter / timing / span / query). * refactor: collapse pkg/o11y/ → root + flatten cloud import Repo IS the package. Mount() at root. Consumers use `github.com/hanzoai/o11y` (no /pkg/o11y/ nesting).
75 lines
2.3 KiB
Plaintext
75 lines
2.3 KiB
Plaintext
# Hanzo o11y — ZAP Schema (HIP-0106)
|
|
#
|
|
# Server: hanzoai/o11y mounted at /v1/o11y inside the unified cloud binary.
|
|
# Metrics, traces, logs, dashboards, alerts, rule evaluation, opamp.
|
|
#
|
|
# Code generation:
|
|
# zapc generate o11y.zap --lang go --out ./pkg/o11y/zap/
|
|
# zapc generate o11y.zap --lang ts --out ./frontend/src/zap/
|
|
# zapc generate o11y.zap --lang py --out ./py/zap/
|
|
# zapc generate o11y.zap --lang rust --out ./rust/src/zap/
|
|
|
|
# ── Telemetry primitives ────────────────────────────────────────────────
|
|
|
|
struct Counter
|
|
name Text
|
|
tags List(Text)
|
|
value Int64
|
|
|
|
struct Timing
|
|
name Text
|
|
tags List(Text)
|
|
seconds Float64
|
|
|
|
struct Span
|
|
name Text
|
|
traceId Text
|
|
spanId Text
|
|
parentId Text
|
|
startUnix Int64
|
|
endUnix Int64
|
|
attrs Text # OTLP attributes, JSON-encoded
|
|
|
|
# ── Query interface ─────────────────────────────────────────────────────
|
|
|
|
struct QueryRequest
|
|
query Text
|
|
start Int64
|
|
end Int64
|
|
step Int64
|
|
variables Text # JSON-encoded template variables
|
|
|
|
struct QueryResult
|
|
series List(Series)
|
|
scalar Float64
|
|
string Text
|
|
type Text # "matrix" | "vector" | "scalar" | "string"
|
|
|
|
struct Series
|
|
labels Text # JSON-encoded label set
|
|
samples List(Sample)
|
|
|
|
struct Sample
|
|
timestamp Int64
|
|
value Float64
|
|
|
|
# ── Health ──────────────────────────────────────────────────────────────
|
|
|
|
struct Health
|
|
status Text
|
|
version Text
|
|
|
|
# ── Service interface ───────────────────────────────────────────────────
|
|
|
|
interface O11y
|
|
# Emit telemetry — the canonical write path.
|
|
emitCounter (counter Counter) -> ()
|
|
emitTiming (timing Timing) -> ()
|
|
emitSpan (span Span) -> ()
|
|
|
|
# Query — PromQL / metrics expression evaluator.
|
|
query (request QueryRequest) -> (result QueryResult)
|
|
|
|
# Health probe.
|
|
health () -> (status Health)
|