Commit Graph
100 Commits
Author SHA1 Message Date
zeekayandGitHub babbdec4b8 debrand: SigNoz -> O11y across the tree (+ otel-collector v0.144.7, schema cutover migration) (#28)
* debrand: signoz/SigNoz/SIGNOZ -> o11y/O11y/O11Y across the tree

Rename all SigNoz *branding* to O11y in file contents, file/dir names,
package names, env vars, config keys, comments, docs, SDK code, and the
ClickHouse schema identifiers the querier reads.

Collector dependency:
- Repoint github.com/hanzoai/signoz-otel-collector ->
  github.com/hanzoai/otel-collector and bump v0.144.6 -> v0.144.7
  (go.mod + go.sum reconciled via go mod tidy). Internal package paths
  also debranded upstream: signozschemamigrator -> o11yschemamigrator,
  signozlogspipelineprocessor -> o11ylogspipelineprocessor.
- Fix: v0.144.7 dropped otelconst.DistributedFieldKeysTable from the
  collector's public constants; pin FieldKeysTable = "distributed_field_keys"
  locally in pkg/telemetrymetadata/tables.go.

Package/dir renames (package decl + all importers):
  pkg/apiserver/signozapiserver -> o11yapiserver, plus signozalertmanager,
  signozauthzapi, signozglobal, signozquerier, signozruler, and pkg/signoz -> pkg/o11y.

Schema (read plane): signoz_traces/metrics/logs/metadata/analytics/meter and
signoz_index_v3/index_v2/error_index_v2/spans (+ distributed_*) -> o11y_*.
Data-preserving cutover migration added:
  deploy/clickhouse/migrations/0001_rename_signoz_to_o11y.sql
  (metadata-only RENAME DATABASE/TABLE, no drop/recreate).

Preserved (attribution / external / wire contracts):
- LICENSE + NOTICE verbatim (incl. "software from SigNoz", "Copyright ... SigNoz Inc.").
- Upstream github.com/SigNoz/* repo URLs + @SigNoz/* CODEOWNERS teams.
- Billing resource-attribute regex "signoz.workspace.*" (external wire contract).

go build ./pkg/... ./cmd/... = 0; gofmt clean; renamed+schema pkg tests pass.

* o11y: bump collector to v0.144.8 (o11y_* physical schema writer) + lockstep deploy plan

Collector v0.144.8's schema-migrator + exporters now CREATE/WRITE the same
o11y_* physical databases/tables the querier reads and the RENAME migration
(0001_rename_signoz_to_o11y.sql) targets.

Cross-checked byte-identical: writer DB set == migration target DB set (6);
writer prefixed-table set == migration target table set (8); o11y querier
reads and cloud reads are subsets of that set. Zero table-name mismatches
between writer, readers, and migration.

Collector go.mod unchanged between v0.144.7 and v0.144.8 (identical go.mod
hash) — pure source rename, no module-graph change.

Adds deploy/clickhouse/DEPLOY_signoz_to_o11y_cutover.md: the lockstep order
(collector v0.144.8 -> RENAME migration -> o11y+cloud readers) with a
fresh/scratch-ClickHouse pre-flight (create via migrator, emit trace+metric,
query back) and rollback. Ships together or telemetry blackholes.

go build ./pkg/... ./cmd/community = 0.
2026-07-09 13:08:55 -07:00
b95c6faf6d o11y: version-less public surface — /v1/o11y/<resource>, no nested /vN/ (#27)
Directive: only ONE /v1/ on the wire — /v1/o11y/health, never /v1/o11y/v1/health.
SigNoz's engine speaks /api/vN (5 versions); the version must not leak.

Flattening looked impossible — 30+ resources live in multiple versions
(query_range v3/v4/v5, dashboards, rules, users…) and llmobs deliberately reuses
names (traces/users/sessions) that clash with SigNoz's. Resolved GENERATIVELY, at
the Hanzo seam, zero SigNoz route-literal edits (those get reverted by re-syncs):

- signozapiserver.AddVersionlessAliases walks the assembled router and registers a
  version-less /api/<resource> alias for every /api/vN/<resource> — HIGHEST version
  wins (forward-only, per house rule), and any name already owned by a non-versioned
  route (llmobs) is left to llmobs. Generated => survives a wholesale SigNoz re-sync.
- llmobs routes move to /api/<resource> (own their version-less names).
- mount.go maps the whole /v1/o11y/<resource> contract onto /api/<resource> uniformly
  (leaked /v1/o11y/api/vN kept working for the un-migrated SPA). Because every path
  ends up under /api/, SigNoz's StripPrefix is a no-op — NO cloud CR change needed.

Result: /v1/o11y/health, /v1/o11y/query_range, /v1/o11y/traces — one /v1/, no /api/,
no nested version. Aliaser + mount logic table-tested (8+9 cases) and the in-package
TestAddVersionlessAliases/TestLLMObsRoutes pass; full-graph build is CI-authoritative.

Co-authored-by: hanzo <[email protected]>
2026-07-09 09:19:42 -07:00
8b1de86ad9 mount: serve the whole o11y surface at /v1/o11y/<resource> (kill the /api/ leak) (#26)
* sqlite: one driver-registration site (drop redundant blank modernc import)

The unified cloud binary must register the database/sql \"sqlite\" driver exactly
once. o11y contributed a SECOND registration import: a blank _ \"modernc.org/sqlite\"
in pkg/query-service/app/http_handler.go, on top of the one in
pkg/sqlstore/sqlitesqlstore/provider.go (which MUST import modernc non-blank for the
*sqlite.Error type + modernc/sqlite/lib error-code constants — github.com/hanzoai/sqlite
does not re-export either).

Remove the redundant blank import. The driver stays registered by provider.go, which
pkg/query-service/app transitively imports in every binary (verified via go list -deps
for both cmd/community and the cloud embed) — so registration survives the removal.

Do NOT swap the blank import to github.com/hanzoai/sqlite: under CGO_ENABLED=1 (o11y
CI default) the fork Register()s mattn while modernc also Register()s modernc → the
exact \"sql: Register called twice for driver sqlite\" panic. Under CGO_ENABLED=0
(cloud prod build) the fork routes to modernc and shares its single init with o11y, so
the cloud binary already registers \"sqlite\" once — no fork import needed here.

Add TestDriverRegisteredOnce (pkg/sqlstore/sqlitesqlstore): opens the provider and
asserts journal_mode=wal + busy_timeout>0 through the driver — fails loudly if either
regression (lost registration, or double-register panic) returns. Passes CGO on and off.

* mount: serve the whole o11y surface at /v1/o11y/<resource> — no /api/ leak

The public contract is api.hanzo.ai/v1/o11y/<resource> (one /v1/, no /api/). But
o11y is a SigNoz fork whose FE+BE speak /api/vN (5 live versions), and the mount
delegated to SigNoz's StripPrefix, so the surface leaked as /v1/o11y/api/vN/... AND
the Hanzo llmobs routes (registered at /v1/o11y/*) 404'd once StripPrefix ate the
prefix. The earlier attempt to rip /api/ from SigNoz's 291 route literals was reverted
by an upstream re-sync (o11y/CLAUDE.md) — so this normalizes at the ONE Hanzo-owned
seam (mount.go) instead, zero SigNoz fork diff:

  /v1/o11y/vN/...      -> /api/vN/...   (canonical SigNoz; the /api/ never surfaces)
  /v1/o11y/api/vN/...  -> /api/vN/...   (deprecated alias so current callers keep working)
  /v1/o11y/traces,...  -> unchanged     (Hanzo llmobs, native)

Paired with cloud CR O11Y_GLOBAL_EXTERNAL__URL="" (StripPrefix off) so the llmobs
/v1/o11y/* routes survive to the router — deploy together. Logic table-tested
(mount_test.go); full-graph build is CI-authoritative (root pkg pulls the cloud graph).

---------

Co-authored-by: hanzo <[email protected]>
2026-07-09 00:38:04 -07:00
zeekay f1091f3d41 fix(sqlite): converge onto hanzoai/sqlite — drop modernc, backend-correct DSN
Complete the half-done driver convergence in sqlitesqlstore/provider.go
(origin/main had added the driver_test.go pragma guard + the http_handler
comment, but provider.go still imported modernc directly):

- Drop "modernc.org/sqlite" + "modernc.org/sqlite/lib"; import
  github.com/hanzoai/sqlite, whose init registers the ONE "sqlite" driver
  (mattn/SQLCipher under cgo, modernc pure-Go otherwise) — no more direct
  modernc import that would double-register "sqlite" in the cgo cloud binary.
- WrapAlreadyExistsErrf now classifies via backend-neutral
  sqlite.IsConstraint{Unique,PrimaryKey,ForeignKey} instead of the
  modernc-typed *sqlite.Error + lib.SQLITE_CONSTRAINT_* checks.
- Build the DSN via sqlite.PragmaDSN so pragmas apply under BOTH backends.
  The old hardcoded modernc `_pragma=journal_mode(wal)` form is SILENTLY
  DROPPED by mattn — so under CGO=1 (how o11y links into the cloud binary)
  journal_mode/busy_timeout never applied. driver_test.go now passes under
  mattn too. _txlock (a driver param both backends honor) is appended.

go.mod: + hanzoai/sqlite v0.2.2 (pulls luxfi/crypto 1.19.26, mattn 1.14.47);
exclude mattn v2.0.3+incompatible (the mis-tagged pre-modules version the
cloud graph over-selects, which cannot build the cgo codec). Surgical — no
cloud-graph churn (cloud stays at its pseudo-version).

Verified: cmd/community builds -mod=readonly under CGO=0 AND CGO=1;
pkg/sqlstore tests green both backends (incl the pragma guard); 0 modernc
in the CGO=1 cmd/community graph (no double-registration). Pre-existing
unrelated: go build ./... hits a hanzoai/ai <-> go-openai ReasoningContent
skew in the cloud graph — not o11y source, not this change.
2026-07-08 15:06:28 -07:00
zeekayandGitHub de43d49afa sqlite: one driver-registration site (drop redundant blank modernc import) (#25)
The unified cloud binary must register the database/sql \"sqlite\" driver exactly
once. o11y contributed a SECOND registration import: a blank _ \"modernc.org/sqlite\"
in pkg/query-service/app/http_handler.go, on top of the one in
pkg/sqlstore/sqlitesqlstore/provider.go (which MUST import modernc non-blank for the
*sqlite.Error type + modernc/sqlite/lib error-code constants — github.com/hanzoai/sqlite
does not re-export either).

Remove the redundant blank import. The driver stays registered by provider.go, which
pkg/query-service/app transitively imports in every binary (verified via go list -deps
for both cmd/community and the cloud embed) — so registration survives the removal.

Do NOT swap the blank import to github.com/hanzoai/sqlite: under CGO_ENABLED=1 (o11y
CI default) the fork Register()s mattn while modernc also Register()s modernc → the
exact \"sql: Register called twice for driver sqlite\" panic. Under CGO_ENABLED=0
(cloud prod build) the fork routes to modernc and shares its single init with o11y, so
the cloud binary already registers \"sqlite\" once — no fork import needed here.

Add TestDriverRegisteredOnce (pkg/sqlstore/sqlitesqlstore): opens the provider and
asserts journal_mode=wal + busy_timeout>0 through the driver — fails loudly if either
regression (lost registration, or double-register panic) returns. Passes CGO on and off.
2026-07-08 08:24:30 -07:00
9f64f97c72 fix(deps): add luxfi/age go.sum entry; reconcile go.mod against pinned cloud (#24)
go.sum was missing the checksum for github.com/luxfi/age (pulled transitively
via luxfi/[email protected].0 through hanzoai/cloud), breaking the CI readonly build:
  missing go.sum entry for module providing package github.com/luxfi/age

Re-tidied against the CI-pinned cloud ref (884bdebd), which adds
luxfi/age v1.5.0 (indirect), marks google.golang.org/protobuf indirect
(direct use dropped in #23), and prunes stale go.sum entries.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-08 06:15:17 -07:00
d34d47ee74 opamp: compare via zap2pb; drop direct google.golang.org/protobuf (#23)
agent.go used google.golang.org/protobuf/proto only for proto.Equal on two
OpAMP messages. Route both through github.com/zap-proto/zap2pb (the sanctioned
ZAP<->protobuf boundary) so no Hanzo .go imports google.golang.org/protobuf
directly. Semantics identical (zap2pb.Equal wraps proto.Equal).

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-07 17:28:10 -07:00
7b8a7cbe33 feat(metrics): native datastore metrics driver on upstream ch-go (no DDSketch fork) (#22)
pkg/datastoremetrics writes ZAP MetricBatch straight into the datastore
time_series_v4 + samples_v4 tables via upstream clickhouse-go v2, decomposing
classic Prometheus histograms/summaries into .bucket{le}/.count/.sum/.quantile
samples. Eliminates the signozclickhousemetrics exp_hist/DDSketch dependency on
the forked ch-go that blocked in-process metrics ingest.

Fingerprint (FNV-1a resource->scope->point, __name__ salt) ported verbatim from
the import-walled fork package so join keys stay byte-identical and the existing
query plane reads it unchanged. Reuses telemetrymetrics table-name constants.

Satisfies zapmetricreceiver.Handler. Pure buildRows transformation is exhaustively
unit-tested (counter/gauge/histogram/summary, join-key consistency, hour-floor,
independent FNV cross-check). CGO_ENABLED=0 build + vet + tests green.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-07 14:26:52 -07:00
b813336c95 fix(deps): drop orphan luxfi/age (cold-cache checksum SECURITY ERROR) (#19)
luxfi/age was a stale indirect require that nothing in the module graph
references (go mod why: "main module does not need module github.com/luxfi/age";
0 source imports). Its v1.5.0 tag was upstream-retagged, so any cold-cache
resolution of the recorded h1 hash fails with a checksum SECURITY ERROR.
go mod tidy would remove it; done surgically here (require + go.sum lines).
go mod verify clean.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-05 12:21:39 -07:00
zeekayandGitHub 7817913d7f Merge pull request #21 from hanzoai/feat/community-builder-embed-accessor
feat(community): shared builder for standalone + cloud embed; add Server.PublicHandler
2026-07-04 22:35:53 -07:00
zeekay b7307d2be9 feat(community): shared builder for standalone + cloud embed; add Server.PublicHandler
Factor the whole SigNoz-community construction (config resolution + the provider
set + the app server) into pkg/community, used by BOTH cmd/community and the
hanzoai/cloud in-process embed. One construction, one way: the embed cannot drift
from the running pod's identity (pkg/identn/iamidentn gateway-header auth) or
wiring because it is the same code.

Add app.Server.PublicHandler() — the built middleware+routes handler WITHOUT
binding the standalone listener — so the cloud binary installs it via
o11y.SetHandler and serves /v1/o11y/* in-process while SigNoz.Start runs
background evaluation.

cmd.NewSigNozConfig now delegates to community.NewConfig (one config path).
2026-07-04 22:35:01 -07:00
zeekayandGitHub adefc1b766 Merge pull request #20 from hanzoai/embed/cloud-public-handler
feat(app): export Server.PublicHandler for in-process cloud embedding
2026-07-04 22:30:04 -07:00
zeekay 4b84e09069 feat(app): export Server.PublicHandler for in-process embedding
The unified cloud binary constructs the ONE o11y runtime in-process
(pkg/signoz.New + app.NewServer) and serves /v1/o11y/* on its own HTTP
stack, retiring the standalone o11y Deployment. It needs the fully-wired
public handler — every middleware incl. IdentN identity resolution over
the gateway-injected Hanzo IAM session headers (X-Org-Id/X-User-Id) — WITHOUT
binding a listener (Start/initListeners are the standalone entrypoints).

Add PublicHandler() returning s.httpServer.Handler: the same handler the
standalone server serves, minus the net.Listener. One method, no behavior
change to the standalone path.
2026-07-04 22:14:31 -07:00
63bc7f31f1 feat(logs): un-stub GET /api/v1/logs — real ClickHouse read (#17)
getLogs returned a hardcoded {"results":[]} over 39M+ real log rows. New
Reader.GetRecentLogs reads the configured logs table (r.logsDB.r.logsTableV2 —
tracks the live schema), injection-safe int64/int interpolation, reusing the
shared GetListResultV3 scanner; the handler parses limit/timestampStart/
timestampEnd and maps rows with service.name + k8s.{namespace,pod,container}.
Re-applied from PR #16 onto main's clickhouseReader layout (the PR base had the
datastoreReader rename; main does not).

Co-authored-by: hanzo-dev <[email protected]>
2026-07-04 01:57:13 -07:00
zeekayandGitHub b27d2eef7d fix(frontend): render-safe SPA — tsgo 0, kill next-themes blank-page crash, o11y-site from source (#14)
tsgo 707->0; alias next-themes/next/* to browser stubs (kills blank-page crash); resolve [[.BaseHref]]/[[.Settings]] at build time; Dockerfile.site builds from source; [email protected].4 pin. Render-proven (Playwright, all routes, 0 ReferenceError).
2026-07-03 16:21:48 -07:00
4983088913 debrand: langfuse -> o11y/observability in our prose & comments (#15)
Drop the Langfuse brand from o11y's own backend comments + LLM.md, mirroring
the signoz->o11y product rename (o11y is itself a SigNoz fork that keeps
signozapiserver internals). Comments/docs only, no functional change.
Builds: go build ./pkg/modules/llmobs/... ./pkg/types/llmobstypes/... ./pkg/apiserver/signozapiserver/... OK; gofmt clean.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-03 16:08:11 -07:00
zeekay 0406f0ae5b build(site): o11y-site SPA image via hanzoai/static (edge, no nginx)
The server image is headless (O11Y_WEB_ENABLED=false, /api only); this serves
the dashboard SPA at the edge so o11y.hanzo.ai/ stays 200 with the newer backend.

- Dockerfile.site: re-serves the proven in-production SPA (0.1.0 /etc/o11y/web)
  through hanzoai/static --spa (:3000), byte-identical — same pattern commerce-site
  used while its from-source build was broken. TODO: swap to a from-source node
  build stage once frontend/ pnpm build is green (mid rolldown-vite migration).
- docker-site.yaml: CI build+push ghcr.io/hanzoai/o11y-site on main.
2026-07-03 11:41:02 -07:00
zeekay b897e425fb feat(o11y): zero-onboarding — auto-provision org, native Hanzo IAM session auth, no setup gate
o11y now holds no identity of its own. It is a pure resource server that trusts
the Hanzo IAM session exactly like every other Hanzo service — one IAM validates
once at the edge, every service trusts it. A user who creates an org in Hanzo IAM
gets working observability through their normal session, with zero onboarding.

- New pkg/identn/iamidentn: the sole human identity resolver (pairs with
  iamauthz). Reads the identity headers the gateway injects after validating the
  hanzo.id JWT and stripping client copies (HIP-0026): X-Org-Id (owner slug),
  X-User-Id (sub), X-User-Email. Registered first in the identn resolver;
  identn.iam.enabled=true by default.
- Auto-provision the tenant on first request (idempotent, invisible): create the
  o11y org for the Hanzo org if absent (deterministic UUIDv5 from the org slug,
  managed roles + default configs) and grant the user its admin role in IAM.
  Authorization is unchanged — every access check is still an iamauthz
  batch-enforce; the founding grant just makes a logged-in Hanzo user authorized
  for their own org. Cross-org denied by org scoping (claims.OrgID).
- Kill the setup gate: NewAPIHandler sets SetupCompleted=true unconditionally
  (no org/user counting, no root gate). /api/v1/register is inert and the SPA
  never shows an onboarding wizard. No native users are ever created, so native
  login/invite/session endpoints are dead. apikeyidentn (service accounts) stays
  for machine/OTLP identity.

Security boundary: trusting X-Org-Id/X-User-Id is safe only behind
hanzoai/gateway (sole setter of those headers per HIP-0026); o11y must be
reachable only via the gateway. Default sharder is noop (owns all org keys) so
dynamic tenants pass the identn ownership check.

go build ./cmd/community = 0; go build ./pkg/... ./cmd/... = 0;
go test ./pkg/identn/... ./pkg/authz/... green.
2026-07-02 20:42:09 -07:00
zeekayandGitHub 69c616dfbb fix(iamauthz): block in Start() until Stop — was crashing SigNoz supervisor (#13)
iamauthz.Start() returned nil immediately. factory.Registry.Wait treats any
service Start() return as a service exit and tears the whole process down, so
the query-service crashed at boot ('caught service error, exiting', exception
nil) even with a healthy datastore + schema. Every other no-loop provider
(auditor, meterreporter, licensing, analytics) blocks in Start() until Stop;
iamauthz must too. Block on ctx.Done()/stopC; close stopC in Stop().

Adds provider_lifecycle_test.go covering: Start blocks until Stop, Start
returns on ctx cancel, provider healthy immediately.
2026-07-02 18:13:52 -07:00
zeekayandGitHub b838309bd6 test(config): complete O11Y_ env-prefix debrand across all env-provider tests (#12)
281d622 renamed the env provider prefix SIGNOZ_ -> O11Y_ and updated only
provider_test.go, leaving every downstream env-provider consumer test still
setting the old SIGNOZ_ prefix. Those envs are now ignored by the O11Y_ provider,
so 7 packages failed `go test ./...` (CI red on main): pprof, web, sqlstore,
alertmanager, instrumentation, apiserver, cmd.

Rename the leading env prefix to O11Y_ in these tests (and align alertmanager's
`const prefix` + clearEnv helper). Scope is strictly the env-config prefix:
ClickHouse wire identifiers (constants.SIGNOZ_*_TABLENAME/_DBNAME) and query
reserved vars (SIGNOZ_START_TIME/#SIGNOZ_VALUE) are the datastore schema/query
contract and are deliberately untouched, matching 281d622's "store stays
ClickHouse wire-protocol".

go build ./... green; go test -count=1 -skip '^TestEmailRejected$' ./... = 125
packages OK, 0 failures.
2026-07-02 17:42:56 -07:00
zeekay 2aa66a566e refactor(config): debrand env — O11Y prefix, DATASTORE store name (no SIGNOZ/CLICKHOUSE in env)
Canonical flat operator key O11Y_DATASTORE_DSN aliases into telemetrystore.datastore.dsn; long structured form kept as internal fallback. Store stays ClickHouse wire-protocol (driver/provider/tables unchanged).
2026-07-02 16:50:28 -07:00
zeekay 0a0da3a0f5 fix(instrumentation): derive resource schema URL from the built resource
instrumentation.New pinned the OTEL resource schema to semconv/v1.40.0 while
contrib's NewSDK merges it against resource.Default(), whose schema tracks the
otel/sdk in go.mod (1.41.0 after the SigNoz re-sync). OTEL rejects merging two
non-empty, differing schema URLs, so signoz.New crashed at boot with
'conflicting Schema URL: .../1.41.0 and .../1.40.0' and the server never
listened.

Source the schema URL from the resource we actually detected instead of a
hard-pinned version — it matches resource.Default() by construction and stays
correct across otel bumps. Verified: the server boots, runs the 99 sqlstore
migrations, and listens on 0.0.0.0:8080.
2026-07-02 16:37:14 -07:00
zeekay ff0d04d49f build(docker): buildable o11y server image + CI docker workflow
Fix the root Dockerfile to build the real server binary ./cmd/community
(./cmd/server does not exist) into a minimal Alpine runtime, and add a
GitHub-hosted workflow that builds + pushes ghcr.io/hanzoai/o11y:<sha>
(and :main) on push to main and on v* tags.

cmd/community does not import github.com/hanzoai/cloud, so the go.mod
replace => ../cloud is inert for the image build and no cloud sibling
checkout is needed (unlike the go-build CI job, which compiles mount.go).
Every external module in its graph is a public hanzoai/* fork, so no
private git auth is required for the container build. Runs headless
(SIGNOZ_WEB_ENABLED=false); the SPA is served by hanzoai/static at the edge.
2026-07-02 16:33:52 -07:00
zeekay e6ec943077 feat(o11y): absorb Langfuse LLM-obs — native observations/sessions/scores/annotation over gen_ai spans 2026-07-02 16:03:16 -07:00
zeekay 00c14e7b33 build: complete go.sum module-graph hashes; resolve hanzoai/commerce/metering to v0.1.2
Pre-existing drift (present on pristine main, independent of any feature):
go build ./... needed the transitive /go.mod graph hashes and the minimal
metering patch. go mod verify: all modules verified.
2026-07-02 16:03:11 -07:00
zeekay ea97bff436 fix(ci): run release-drafter on ubuntu-latest, not self-hosted
The kept release-drafter workflow still pointed at the unregistered
self-hosted runner hanzo-build-linux-amd64, leaving its runs stuck queued.
Move it to a GitHub-hosted runner so the only two remaining workflows
(ci.yaml, release-drafter.yml) both run GitHub-hosted.
2026-07-02 15:42:05 -07:00
zeekay 83295b11b7 chore(ci): native GitHub-hosted Go CI; drop SigNoz-internal workflows
Replace the SigNoz-internal CI (observe/primus.workflows reusable workflows,
.primus make system, self-hosted hanzo-build-linux-amd64 runners, ee/ builds)
— all of which startup_failure in hanzoai — with one minimal ubuntu-latest Go CI.

ci.yaml: checkout o11y + sibling hanzoai/cloud (satisfies replace => ../cloud),
setup-go from go.mod (1.26.4), git auth via GH_PAT for private hanzoai/* deps
(commerce, iam, kms, licensing … pulled transitively through cloud), go build
./... as the green gate, go test ./... (skipping one upstream go-smtp-brittle
test, TestEmailRejected).

Deleted: build-community, build-enterprise, build-ghcr, build-staging, goci,
jsci, commitci, e2eci, integrationci, mergequeueci, postci, prereleaser,
releaser, gor-observe, gor-signoz-community, gor-histogramquantile, docs,
workflow-sanity (its reusable workflow runs on self-hosted runners). Kept
release-drafter (public action; runner fixed to ubuntu-latest).
2026-07-02 15:34:40 -07:00
zeekay d62288e934 test(iamauthz): cover the IAM decision + policy contract (httptest, no DB)
Proves the load-bearing path against a mock Hanzo IAM: BatchCheck maps tuples to
Casbin (User,Object,Relation) triples and decodes the enforcerId-scoped nested
batch-enforce result; short results fail closed (deny); Write posts a "p"
AuthzRule to add-policy; ReadTuples decodes get-policies and applies the filter.
2026-07-02 14:50:51 -07:00
zeekay 8b1eef013f feat: re-layer Hanzo IAM authz + ZAP receivers on latest-SigNoz base (§4c preserved)
Re-apply the Hanzo-original packages that the wholesale SigNoz re-sync reverted,
reconciled against the new latest-SigNoz APIs. Build stays green (go build ./...
= 0, incl. -mod=readonly).

authz — Hanzo IAM is now the ONE AND ONLY authorization provider. OpenFGA is
ripped out entirely, not merely defaulted-away:
  * Deleted pkg/authz/openfgaauthz, openfgaserver, openfgaschema, schema.go.
  * Dropped github.com/openfga/* from go.mod/go.sum (go mod tidy).
  * Removed the openfgav1 proto TupleKey from the authz.AuthZ interface and
    authtypes; introduced a Hanzo-native authtypes.TupleKey / ReadRequestTupleKey
    (a plain user/relation/object triple). This is what let openfga leave go.mod.
  * New pkg/authz/iamauthz implements authz.AuthZ as the sole provider: the
    decision path (Check*, BatchCheck, CheckTransactions) delegates to Hanzo IAM's
    Casbin enforce endpoint over plain HTTP+JSON (/v1/iam/batch-enforce); tuple
    storage (Write/Grant/Revoke/ReadTuples/ListObjects) maps onto IAM policies
    (/v1/iam/{add,remove}-policy, get-policies). Role metadata stays in the local
    SQL role store (not an IAM concern). Tuple (User,Relation,Object) → Casbin
    (sub,obj,act) = (User,Object,Relation). Secrets (client id/secret) come from
    env, never config.
  * Wired as the sole factory in cmd/community/server.go; authz.Config default
    provider = "iam". No provider-selection indirection remains.

zapreceiver + zapmetricreceiver — restored the luxfi/zap-native span/metric batch
receivers; API matches luxfi/zap v1.2.0 unchanged (promoted to a direct dep).
Tests pass.

billing + billingtypes — restored both standalone packages (types + noop Handler
contract). Their old route wiring lived in pkg/apiserver/o11yapiserver, which the
re-sync replaced with signozapiserver; recreating that provider is out of scope,
so billing is available-but-unwired pending an apiserver seam.

No ee/, no github.com/SigNoz/* imports, mount.go/NOTICE/LICENSE untouched.
2026-07-02 14:49:27 -07:00
zeekay 9a089ef94a docs: o11y builds green on latest-SigNoz base; note Hanzo layer to re-apply (iamauthz/zap-receivers) 2026-07-02 14:25:55 -07:00
zeekay b9f9cdf918 feat: bump o11y fork to latest SigNoz — full re-sync, builds green (§4c retained)
Re-sync the entire SigNoz-derived Go tree to a clean fork of latest SigNoz
main (upstream 3e6339019), eliminating the version-skew that broke
`go build ./...` (mixed-era packages, ~14 imported-but-absent packages,
partial signoz->o11y / clickhouse->datastore rebrands, self-import cycle,
duplicate package decls).

- pkg/ + cmd/ wholesale replaced with latest SigNoz; imports rewritten
  github.com/SigNoz/signoz/ -> github.com/hanzoai/o11y/.
- Adopt SigNoz's CURRENT structure (resourcefilter->telemetryresourcefilter,
  integrationtypes->cloudintegrationtypes, roletypes/grammar/times folded in
  upstream); old paths dropped.
- Fork deps repathed to hanzoai + bumped: signoz-otel-collector v0.144.6,
  clickhouse-go-mock v0.14.1, govaluate v0.1.0; expr-lang/expr => hanzoai/expr
  v1.17.8 (replace). go.mod reconciled from latest SigNoz; go.sum re-tidied.
- ee/ + cmd/enterprise stripped — o11y stays MIT-only; community edition
  imports no ee packages.
- Preserved o11y additions: module path github.com/hanzoai/o11y, mount.go
  (cloud.Register/zip mount adapter, HIP-0106), NOTICE + LICENSE (SigNoz §4c
  attribution retained; upstream pkg files are headerless per SigNoz convention).
- Reverted o11y cosmetic renames (o11y*/datastore*) and experimental originals
  (authz/iamauthz, billing, zapreceiver, zapmetricreceiver) to SigNoz canonical
  to kill the skew; snapshots retained in git history for re-layering.

go build ./... = exit 0. go vet clean except benign "unreachable code" in
generated ANTLR parser files (inherited from upstream).
2026-07-02 14:20:32 -07:00
zeekay 9dced82380 chore: strip SigNoz ee/ + cmd/enterprise/ — permissive (MIT) only
Remove SigNoz's source-available Enterprise-licensed code (ee/, 40 files +
cmd/enterprise/, 6 files) so o11y uses ONLY the MIT Expat-licensed SigNoz portions.
Nothing in the MIT pkg/ tree imports ee/ (self-contained enterprise modules), so
this is a clean removal. NOTICE updated to reflect ee/ is not included/redistributed.
Makes the repo safe to open-source (no non-OSS SigNoz Enterprise code).
2026-07-02 12:22:01 -07:00
zeekay a721408217 chore: OSS attribution — SigNoz LICENSE + NOTICE 2026-07-02 12:03:13 -07:00
zeekay 8186c01165 chore: zip v1.1.0 — one-verb Listen + free MCP
Bump zap-proto/zip v1.0.0 -> v1.1.0 (final API: single Listen, transport as
address scheme; free MCP tool surface). go.sum re-recorded vs immutable proxy.
2026-07-02 00:22:32 -07:00
zeekay 6f487c4178 chore: zip canonical home — github.com/hanzoai/zip -> github.com/zap-proto/[email protected]
zip is shared protocol infra; its canonical home is the ZAP family (zap-proto/*),
not a brand namespace. Pure import-path move, identical API. Build green.
2026-07-01 23:19:02 -07:00
zeekay ef63988737 refactor(routes): kill /api/ — serve /v1/o11y/* natively, no shim
Every route now registers at its exact public path (/v1/o11y/<version>/<path>):
291 route literals /api/vN → /v1/o11y/vN across pkg/ + ee/, the excluded_routes
config, and the docker healthcheck probes. Deleted the NewRewrite("/v1/o11y","/api")
middleware + its file (pkg/http/middleware/rewrite.go) — no translation layer.
One and one way: the route IS the path. Tests updated to the new paths.

Pairs with hanzoai/cloud clients/o11y forwarding the path VERBATIM (rewritePath
removed) — the two must deploy together (both move the /api↔/v1/o11y boundary).
Frontend (retired; console2 replaces it) left untouched to keep its build green.
2026-06-30 21:39:47 -07:00
4102219754 fork: own SigNoz platform deps under hanzoai + repath off upstream brand (Phase 1) (#9)
* fork: own SigNoz platform deps under hanzoai, repath imports off upstream brand

Phase 1 of the full-fork mandate: eliminate upstream-branded SigNoz modules,
own them as public hanzoai forks, and repath all imports to hanzoai paths.

Owned deps (new public hanzoai forks, module renamed to hanzoai path):
  github.com/SigNoz/signoz-otel-collector v0.144.3
    -> github.com/hanzoai/signoz-otel-collector v0.144.6 (module renamed)
  github.com/SigNoz/clickhouse-go-mock v0.14.0
    -> github.com/hanzoai/clickhouse-go-mock v0.14.1 (module renamed)
  github.com/SigNoz/govaluate v0.0.0-20240203125216-988004ccc7fd
    -> github.com/hanzoai/govaluate v0.1.0 (module renamed)
  github.com/SigNoz/expr (replace target for github.com/expr-lang/expr)
    -> github.com/hanzoai/expr v1.17.8 (upstream module path preserved,
       consumed via replace exactly like the prior SigNoz/expr fork)

In-repo repath: the vendored SigNoz source tree in pkg/, ee/, cmd/ is now
self-referenced as github.com/hanzoai/o11y/... instead of
github.com/SigNoz/signoz/... (1300+ import lines across 377 files), matching
the 750 files already on the hanzoai path. Zero SigNoz-branded module
references remain in go.mod or any .go import.

Generic ecosystem libraries (golang.org/x, google.golang.org, prometheus,
opentelemetry, gin, cobra, luxfi/*, etc.) are left untouched — only the
SigNoz platform fork is owned.

Pre-existing (NOT introduced here): origin/main does not `go build ./...`
because 22 packages are imported but absent from the vendored tree; 14 of
them (roletypes, grammar, cloudintegrations, resourcefilter, integrationtypes,
metricsexplorer, metrics_explorer, times, agg_rewrite, bucket_cache,
sqlitesqlstore, sqlschema/postgressqlschema, sqlstore/postgressqlstore,
cloudintegrations/services) exist in no upstream SigNoz version and must be
vendored into hanzoai/o11y from hanzoai/signoz@770f464f to finish. This
repath is orthogonal to that gap.

* docs(LLM.md): fork boundary map + pre-existing compile-gap inventory

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-06-30 18:05:03 -07:00
zeekay 9f44e42f4b docs(brand): add hero banner 2026-06-28 20:17:37 -07:00
zeekay 526762adf7 chore(brand): dynamic hero banner 2026-06-28 20:17:36 -07:00
270cef2bd2 ci: run on self-hosted ARC pool (hanzo-build-linux-amd64/deploy), not GitHub-hosted (#7)
Co-authored-by: zeekay <[email protected]>
2026-06-19 20:37:12 -07:00
zeekayandGitHub d668405426 chore: bump Go to 1.26.4 (#6)
* chore: bump Go to 1.26.4

Also adds the required `packages: []` field to frontend/pnpm-workspace.yaml
so pnpm 10+ can parse the file. The missing field was blocking the husky
pre-commit hook from running pnpm exec lint-staged.

* chore(deps): replace prometheus/client_golang with luxfi/metric

Mechanical migration following the beego v2.3.8 fork precedent.
Same exposition surface, zero prometheus/client_golang in the
dep graph. The prometheus/alertmanager dep is unrelated and
remains for now.

* docs(alerting): add RFC for decoupling prometheus/alertmanager

---------

Co-authored-by: zeekay <[email protected]>
2026-06-16 21:04:11 -07:00
zeekay ed4424bf84 merge: upstream/main (sync, brand preserved)
# Conflicts:
#	.github/workflows/build-community.yaml
#	.github/workflows/build-enterprise.yaml
#	.github/workflows/gor-signoz-community.yaml
#	cmd/community/Dockerfile
#	cmd/community/Dockerfile.multi-arch
#	cmd/community/main.go
#	cmd/community/server.go
#	cmd/enterprise/Dockerfile
#	cmd/enterprise/Dockerfile.integration
#	cmd/enterprise/Dockerfile.with-web.integration
#	cmd/server/metastore.go
#	cmd/zap.go
#	conf/prometheus.yml
#	deploy/docker-swarm/generator/hotrod/docker-compose.yaml
#	deploy/docker-swarm/generator/infra/docker-compose.yaml
#	deploy/docker-swarm/generator/infra/otel-agent-config.yaml
#	deploy/docker-swarm/generator/infra/otel-metrics-config.yaml
#	deploy/docker/generator/hotrod/docker-compose.yaml
#	deploy/docker/generator/infra/docker-compose.yaml
#	deploy/docker/generator/infra/otel-collector-config.yaml
#	docs/contributing/go/integration.md
#	ee/anomaly/hourly.go
#	ee/anomaly/params.go
#	ee/anomaly/seasonal.go
#	ee/authn/callbackauthn/oidccallbackauthn/authn.go
#	ee/authz/openfgaauthz/provider.go
#	ee/authz/openfgaschema/base.fga
#	ee/authz/openfgaserver/server.go
#	ee/licensing/config.go
#	ee/licensing/httplicensing/provider.go
#	ee/modules/dashboard/impldashboard/module.go
#	ee/querier/handler.go
#	ee/query-service/anomaly/seasonal.go
#	ee/query-service/app/api/cloudIntegrations.go
#	ee/query-service/app/api/featureFlags.go
#	ee/query-service/app/api/license.go
#	ee/query-service/app/api/queryrange.go
#	ee/query-service/rules/anomaly.go
#	ee/query-service/rules/anomaly_test.go
#	ee/query-service/rules/manager.go
#	ee/query-service/rules/manager_test.go
#	ee/query-service/usage/manager.go
#	ee/sqlschema/postgressqlschema/provider.go
#	ee/sqlstore/postgressqlstore/dialect.go
#	ee/sqlstore/postgressqlstore/provider.go
#	ee/zeus/config.go
#	ee/zeus/httpzeus/provider.go
#	frontend/.eslintrc.cjs
#	frontend/e2e/test-plan/README.md
#	frontend/e2e/test-plan/validation-report.md
#	frontend/e2e/tests/settings/account-settings/account-settings-settings.spec.ts
#	frontend/e2e/tests/settings/api-keys/api-keys-settings.spec.ts
#	frontend/playwright.config.ts
#	frontend/public/Images/signoz-hero-image.webp
#	frontend/public/Logos/signoz-brand-logo.svg
#	frontend/scripts/generate-permissions-type.cjs
#	frontend/src/assets/Images/o11y-hero-image.webp
#	frontend/src/assets/Images/signoz-hero-image.webp
#	frontend/src/assets/Logos/hanzo-brand-logo.svg
#	frontend/src/assets/Logos/hanzo-icon.svg
#	frontend/src/assets/Logos/o11y-brand-logo.svg
#	frontend/src/assets/Logos/signoz-brand-logo.svg
#	frontend/src/assets/SigNoz-dark.svg
#	frontend/src/assets/SigNoz-white.svg
#	frontend/src/assets/signoz.svg
#	frontend/src/components/DetailsDrawer/DetailsDrawer.styles.scss
#	frontend/src/components/HostMetricsDetail/HostMetricTraces/HostMetricTraces.styles.scss
#	frontend/src/components/HostMetricsDetail/HostMetricTraces/constants.ts
#	frontend/src/components/HostMetricsDetail/HostMetricsDetail.styles.scss
#	frontend/src/components/HostMetricsDetail/HostMetricsDetails.tsx
#	frontend/src/components/HostMetricsDetail/HostMetricsLogs/NoLogsContainer.tsx
#	frontend/src/components/HostMetricsDetail/HostMetricsLogs/constants.ts
#	frontend/src/components/LogsDownloadOptionsMenu/LogsDownloadOptionsMenu.styles.scss
#	frontend/src/components/WelcomeLeftContainer/index.tsx
#	frontend/src/container/APIKeys/APIKeys.styles.scss
#	frontend/src/container/APIKeys/APIKeys.test.tsx
#	frontend/src/container/APIKeys/APIKeys.tsx
#	frontend/src/container/CloudIntegrationPage/Header/Header.tsx
#	frontend/src/container/CloudIntegrationPage/HeroSection/HeroSection.tsx
#	frontend/src/container/CloudIntegrationPage/HeroSection/components/AccountActions.style.scss
#	frontend/src/container/CloudIntegrationPage/HeroSection/components/AccountActions.tsx
#	frontend/src/container/CloudIntegrationPage/HeroSection/components/AccountSettingsModal.style.scss
#	frontend/src/container/CloudIntegrationPage/HeroSection/components/AccountSettingsModal.tsx
#	frontend/src/container/CloudIntegrationPage/HeroSection/components/CloudAccountSetupModal.style.scss
#	frontend/src/container/CloudIntegrationPage/HeroSection/components/RemoveIntegrationAccount.tsx
#	frontend/src/container/CloudIntegrationPage/ServicesSection/ConfigureServiceModal.tsx
#	frontend/src/container/CloudIntegrationPage/ServicesSection/ServicesTabs.style.scss
#	frontend/src/container/CloudIntegrationPage/ServicesSection/ServicesTabs.tsx
#	frontend/src/container/DashboardContainer/DashboardSettings/General/AddTags/AddTags.styles.scss
#	frontend/src/container/DashboardContainer/DashboardSettings/General/GeneralSettings.styles.scss
#	frontend/src/container/FormAlertRules/ChQuerySection/ChQuerySection.tsx
#	frontend/src/container/FormAlertRules/UserGuide/index.tsx
#	frontend/src/container/InfraMonitoringHosts/HostsEmptyOrIncorrectMetrics.tsx
#	frontend/src/container/InfraMonitoringHosts/InfraMonitoring.styles.scss
#	frontend/src/container/InfraMonitoringHosts/__tests__/HostsEmptyOrIncorrectMetrics.test.tsx
#	frontend/src/container/InfraMonitoringK8s/Clusters/ClusterDetails/ClusterDetails.tsx
#	frontend/src/container/InfraMonitoringK8s/Clusters/utils.tsx
#	frontend/src/container/InfraMonitoringK8s/DaemonSets/DaemonSetDetails/DaemonSetDetails.tsx
#	frontend/src/container/InfraMonitoringK8s/DaemonSets/utils.tsx
#	frontend/src/container/InfraMonitoringK8s/Deployments/DeploymentDetails/DeploymentDetails.tsx
#	frontend/src/container/InfraMonitoringK8s/Deployments/utils.tsx
#	frontend/src/container/InfraMonitoringK8s/EntityDetailsUtils/EntityEvents/entityEvents.styles.scss
#	frontend/src/container/InfraMonitoringK8s/EntityDetailsUtils/EntityTraces/entityTraces.styles.scss
#	frontend/src/container/InfraMonitoringK8s/InfraMonitoringK8s.styles.scss
#	frontend/src/container/InfraMonitoringK8s/Jobs/JobDetails/JobDetails.tsx
#	frontend/src/container/InfraMonitoringK8s/Jobs/utils.tsx
#	frontend/src/container/InfraMonitoringK8s/K8sEmptyOrIncorrectMetrics.tsx
#	frontend/src/container/InfraMonitoringK8s/K8sFiltersSidePanel/K8sFiltersSidePanel.styles.scss
#	frontend/src/container/InfraMonitoringK8s/Namespaces/NamespaceDetails/NamespaceDetails.styles.scss
#	frontend/src/container/InfraMonitoringK8s/Namespaces/NamespaceDetails/NamespaceDetails.tsx
#	frontend/src/container/InfraMonitoringK8s/Namespaces/utils.tsx
#	frontend/src/container/InfraMonitoringK8s/Nodes/NodeDetails/NodeDetails.tsx
#	frontend/src/container/InfraMonitoringK8s/Nodes/utils.tsx
#	frontend/src/container/InfraMonitoringK8s/Pods/PodDetails/PodDetails.tsx
#	frontend/src/container/InfraMonitoringK8s/StatefulSets/StatefulSetDetails/StatefulSetDetails.tsx
#	frontend/src/container/InfraMonitoringK8s/StatefulSets/utils.tsx
#	frontend/src/container/InfraMonitoringK8s/Volumes/VolumeDetails/VolumeDetails.tsx
#	frontend/src/container/InfraMonitoringK8s/Volumes/utils.tsx
#	frontend/src/container/ListAlertRules/AlertsEmptyState/AlertsEmptyState.styles.scss
#	frontend/src/container/ListAlertRules/ListAlert.tsx
#	frontend/src/container/LogsContextList/styles.ts
#	frontend/src/container/LogsExplorerList/ColumnView/ColumnView.tsx
#	frontend/src/container/LogsExplorerViews/QueryStatus.tsx
#	frontend/src/container/MetricsApplication/Tabs/Overview/ApDex/ApDexTraces.tsx
#	frontend/src/container/MetricsExplorer/Explorer/RelatedMetrics.tsx
#	frontend/src/container/MetricsExplorer/Explorer/useGetRelatedMetricsGraphs.ts
#	frontend/src/container/MetricsExplorer/Summary/MetricTypeSearch.tsx
#	frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/index.tsx
#	frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/query.tsx
#	frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/clickHouse/index.tsx
#	frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/clickHouse/query.tsx
#	frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/datastore/index.tsx
#	frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/datastore/query.tsx
#	frontend/src/container/OnboardingQuestionaire/OnboardingFooter/OnboardingFooter.tsx
#	frontend/src/container/OnboardingQuestionaire/OnboardingHeader/OnboardingHeader.styles.scss
#	frontend/src/container/OnboardingQuestionaire/OnboardingHeader/OnboardingHeader.tsx
#	frontend/src/container/OnboardingV2Container/onboarding-configs/onboarding-config-with-links.json
#	frontend/src/container/QueryBuilder/QueryBuilder.tsx
#	frontend/src/container/QueryBuilder/components/Query/Query.tsx
#	frontend/src/container/RolesSettings/__tests__/utils.test.ts
#	frontend/src/container/ServiceTable/SkipOnBoardModal/index.tsx
#	frontend/src/container/TraceDetail/Missingtrace.tsx
#	frontend/src/container/TraceDetail/SelectedSpanDetails/config.ts
#	frontend/src/lib/uPlotV2/components/Tooltip/Tooltip.styles.scss
#	frontend/src/mocks-server/__mockdata__/apiKeys.ts
#	frontend/src/pages/AlertDetails/AlertHeader/AlertStatus/AlertStatus.tsx
#	frontend/src/pages/Integrations/IntegrationDetailPage/IntegrationDetailPage.styles.scss
#	frontend/src/pages/Integrations/IntegrationDetailPage/IntegrationDetailPage.tsx
#	frontend/src/pages/Integrations/IntegrationsList.tsx
#	frontend/src/pages/Integrations/utils.ts
#	frontend/src/types/api/integrations/aws.ts
#	pkg/alertmanager/o11yalertmanager/handler.go
#	pkg/apiserver/o11yapiserver/alertmanager.go
#	pkg/apiserver/o11yapiserver/cloudintegration.go
#	pkg/apiserver/o11yapiserver/inframonitoring.go
#	pkg/apiserver/o11yapiserver/llmpricingrule.go
#	pkg/apiserver/o11yapiserver/rawdataexport.go
#	pkg/apiserver/o11yapiserver/registry.go
#	pkg/apiserver/o11yapiserver/ruler.go
#	pkg/apiserver/o11yapiserver/ruler_examples.go
#	pkg/apiserver/o11yapiserver/ruler_examples_test.go
#	pkg/apiserver/o11yapiserver/rulestatehistory.go
#	pkg/apiserver/o11yapiserver/spanmapper.go
#	pkg/apiserver/o11yapiserver/tracedetail.go
#	pkg/authn/callbackauthn/googlecallbackauthn/authn.go
#	pkg/authz/openfgaauthz/provider.go
#	pkg/authz/openfgaschema/base.fga
#	pkg/authz/openfgaserver/server.go
#	pkg/authz/openfgaserver/server_test.go
#	pkg/authz/openfgaserver/sqlstore.go
#	pkg/http/middleware/api_key.go
#	pkg/http/middleware/authn.go
#	pkg/instrumentation/metric.go
#	pkg/modules/user/impluser/module.go
#	pkg/prometheus/clickhouseprometheus/client.go
#	pkg/prometheus/clickhouseprometheus/client_query_test.go
#	pkg/prometheus/clickhouseprometheus/provider.go
#	pkg/prometheus/config.go
#	pkg/prometheus/engine.go
#	pkg/prometheus/label.go
#	pkg/prometheus/prometheus.go
#	pkg/prometheus/prometheustest/provider.go
#	pkg/prometheus/prometheustest/utils_test.go
#	pkg/querier/promql_query.go
#	pkg/query-service/app/cloudintegrations/Readme.md
#	pkg/query-service/app/cloudintegrations/accountsRepo.go
#	pkg/query-service/app/cloudintegrations/constants.go
#	pkg/query-service/app/cloudintegrations/controller.go
#	pkg/query-service/app/cloudintegrations/models.go
#	pkg/query-service/app/cloudintegrations/serviceconfig_db.go
#	pkg/query-service/app/cloudintegrations/services/definitions/aws/eks/assets/dashboards/containerinsights.json
#	pkg/query-service/app/cloudintegrations/services/definitions/aws/eks/assets/dashboards/containerinsights_dot.json
#	pkg/query-service/app/cloudintegrations/services/definitions/aws/eks/assets/dashboards/overview.json
#	pkg/query-service/app/cloudintegrations/services/definitions/aws/eks/assets/dashboards/overview_dot.json
#	pkg/query-service/app/cloudintegrations/services/models.go
#	pkg/query-service/app/cloudintegrations/services/services.go
#	pkg/query-service/app/cloudintegrations/services/services_test.go
#	pkg/query-service/app/integrations/builtin_integrations/clickhouse/assets/dashboards/overview_dot.json
#	pkg/query-service/app/integrations/builtin_integrations/datastore/assets/dashboards/overview_dot.json
#	pkg/query-service/app/metricsexplorer/parser.go
#	pkg/query-service/app/metricsexplorer/summary.go
#	pkg/query-service/app/querier/querier_test.go
#	pkg/query-service/app/querier/v2/querier_test.go
#	pkg/query-service/app/summary.go
#	pkg/query-service/model/metrics_explorer/summary.go
#	pkg/query-service/rules/base_rule_test.go
#	pkg/query-service/rules/manager_test.go
#	pkg/query-service/rules/prom_rule.go
#	pkg/query-service/rules/prom_rule_task.go
#	pkg/query-service/rules/prom_rule_test.go
#	pkg/query-service/rules/threshold_rule_test.go
#	pkg/querybuilder/resourcefilter/tables.go
#	pkg/queryparser/queryfilterextractor/promql.go
#	pkg/ruler/o11yruler/handler.go
#	pkg/sqlmigration/088_migrate_ii_dashboards/clickhouse/overview.json
#	pkg/telemetrymetadata/metadata_test.go
#	pkg/telemetrystore/datastoretelemetrystore/telemetry.go
#	pkg/types/authtypes/name.go
#	pkg/types/authtypes/object.go
#	pkg/types/authtypes/selector.go
#	pkg/types/authtypes/typeable.go
#	pkg/types/authtypes/typeable_anonymous.go
#	pkg/types/authtypes/typeable_metaresource.go
#	pkg/types/authtypes/typeable_metaresources.go
#	pkg/types/authtypes/typeable_organization.go
#	pkg/types/authtypes/typeable_role.go
#	pkg/types/authtypes/typeable_user.go
#	pkg/types/authtypes/uuid.go
#	pkg/types/ctxtypes/auth.go
#	pkg/types/factor_api_key.go
#	pkg/types/integrationtypes/integration.go
#	pkg/types/roletypes/store.go
#	pkg/types/ruletypes/maintenance.go
#	pkg/types/serviceaccounttypes/service_account_role.go
#	pkg/types/serviceaccounttypes/store.go
2026-06-02 10:54:25 -07:00
zeekay df5944d0fe merge: feat/cloud-mount
# Conflicts:
#	.github/workflows/build-ghcr.yaml
#	authn.go
#	cmd/enterprise/server.go
#	ee/query-service/app/api/api.go
#	ee/query-service/app/server.go
#	go.mod
#	pkg/query-service/rules/managertestfactory.go
2026-06-01 18:44:52 -07:00
zeekay 892414bf11 merge: ci/shared-docker-workflow
# Conflicts:
#	.github/workflows/build-ghcr.yaml
2026-06-01 18:44:46 -07:00
zeekay 500a404575 merge: ci/canonical-docker-build-1776997064
# Conflicts:
#	.github/workflows/build-ghcr.yaml
#	go.sum
2026-06-01 18:44:41 -07:00
zeekay 0fb5751a30 merge: chore/go-1.26.3 2026-06-01 18:39:35 -07:00
zeekayandGitHub c660ba020e ci: migrate Docker build to shared reusable workflow (#1)
* ci: migrate Docker build to shared reusable workflow

Add multi-stage root Dockerfile (frontend + Go build + alpine
runtime) so the shared workflow can build everything in one
docker build. Replace the old build-ghcr.yaml (pre-build
outside Docker + thin COPY image) with a single call to
hanzoai/.github/.github/workflows/docker-build.yml@main.

amd64-only until arm64 runner is restored.

* chore: migrate frontend from yarn to pnpm

- Remove yarn.lock, generate pnpm-lock.yaml
- Update Dockerfile to use pnpm install --frozen-lockfile
- Convert package.json resolutions to pnpm.overrides
- Replace yarn references in postinstall script with pnpm
2026-05-29 22:06:19 -07:00
zeekay a449888935 chore(husky): switch yarn → pnpm in frontend hooks
Both pre-commit and commit-msg invoked yarn 1.x. On machines where
corepack enforces a global packageManager (e.g. ~/package.json
declares pnpm), yarn 1.x bails before running the script so every
commit fails with an opaque "husky - hook exited with code 1".

pnpm exec lint-staged / pnpm exec commitlint resolve the same
binaries via pnpm's own node_modules layout. lint-staged and
commitlint are already installed in frontend/node_modules.
2026-05-25 17:02:23 -07:00
zeekay 67e23ca061 feat(zapmetricreceiver): ZAP-native metric ingest (MsgMetricBatch=2) 2026-05-25 15:49:32 -07:00
zeekay 92d0ff72e7 rip: kill prometheus from default build — canonical path is ZAP→datastore
Default build now contains ZERO github.com/prometheus/{client_golang,
prometheus,common,client_model}. PromQL evaluation was signoz-inherited
dead code that pulled the Prometheus server library + transitive
prometheus/client_golang chain.

Deleted (no replacements, no shims, no -tags fallbacks):
  pkg/prometheus/{prometheus,engine,utils}.go
  pkg/prometheus/{nooprometheus,prometheustest}/
  pkg/querier/promql_query{,_parser}.go
  pkg/queryparser/queryfilterextractor/promql.go
  pkg/query-service/rules/prom_rule{,_task}.go
  pkg/query-service/rules/managertestfactory.go
  scripts/clickhouse/histogramquantile/main.go
  pkg/query-service/{app/querier/*,rules}/*_test.go that depended on PromQL

Rewired:
  - HTTP routes /api/v1/query{,_range} (PromQL endpoints) removed
  - querier.execPromQuery → error path
  - Reader interface's GetInstantQueryMetricsResult / GetQueryRangeResult removed
  - QueryTypePromQL case clauses → invalid-input error
  - Manager rejects RuleTypeProm with conversion-to-threshold message
  - TaskTypeProm dispatcher → unconditional newRuleTask
  - Config drops Prometheus field; Services struct drops Prometheus member
  - Provider factory wiring (NewPrometheusProviderFactories) deleted

Build:
  go list -deps ./... | grep -cE 'prometheus/(client_golang|prometheus|common|client_model)' = 0

Bumps hanzoai/common v0.67.6 → v0.67.7 (model.EscapeMetricFamily split
into model/promfamily/ so model closure no longer pulls dto).
2026-05-24 07:37:26 -07:00
zeekay f23a1b7073 deps: drop -hanzo suffix — use plain semver (hanzoai/common v0.67.6) 2026-05-23 19:24:36 -07:00
zeekay 8a31259d4b deps: prometheus/common → hanzoai/common across alertmanager-types + notifiers (kill go-conntrack→prom chain)
Sweep 23 files under pkg/types/alertmanagertypes + pkg/alertmanager/
alertmanagernotify/ from github.com/prometheus/common → github.com/
hanzoai/common. Combined with the hanzoai/{exporter-toolkit,sigv4}
swaps in the alertmanager workspace fork, the go-conntrack →
prometheus/client_golang chain is no longer pulled by o11y's runtime
build closure.

Remaining 2 prom paths in o11y come from github.com/prometheus/
prometheus (the actual Prometheus server library — PromQL engine +
TSDB chunks + util/stats). Independent boundary; tracked separately.
2026-05-22 21:19:32 -07:00
zeekay 1f3d92840f feat: swap prometheus/client_golang → luxfi/metric across alertmanager boundary
The alertmanager-library boundary files (pkg/types/alertmanagertypes/
marker.go, pkg/alertmanager/{service,alertmanagerserver/{server,telemetry}}.go)
now talk luxfi/metric directly. The prometheus/alertmanager fork at
hanzo/alertmanager provides a promshim package that bridges its own
prometheus.* call sites to luxfi/metric.

Bumps luxfi/metric to v1.5.7 — adds Vec.Reset(), Gauge.SetToCurrentTime(),
WrapRegistererWithPrefix/With, ExponentialBuckets/LinearBuckets,
prom-compat parity needed by both consumers.

Remaining 2 prom paths in o11y's closure come from prometheus/common/
config → mwitkow/go-conntrack (HTTP transport conn-tracking metrics).
Independent boundary; tracked separately.
2026-05-22 20:52:10 -07:00
zeekay bc060a097b feat(workspace): drop local replaces, migrate koanf v1→v2, restore test factory
go.mod / go.sum
  ---------------
  Drop the 4 local `replace` directives (alertmanager, ClickHouse-go,
  ClickHouse-sql-parser, ClickHouse-go-mock). The hanzo go.work
  workspace at /Users/z/work/hanzo/go.work now provides those modules
  through `use ./...` entries, so the per-module replace lines are
  redundant. One way to do everything: workspace mode is canonical.

  koanf v1.5.0 → v2.3.2
  ---------------------
  Replace koanf v1 with the standalone v2-aligned parser / provider
  modules: parsers/{[email protected],[email protected]}, providers/{[email protected],
  [email protected],[email protected],[email protected]}. The mocks.go test helper
  switches from the unversioned `koanf` v1 import to `koanf/v2`.

  koanf v1 enters the graph transitively via
  SigNoz/signoz-otel-collector (we only use schema_migrator). Its
  package paths collide with the standalone v2 module paths, so add an
  `exclude github.com/knadh/koanf v1.5.0` to keep resolution
  unambiguous.

  Side effect: ~30 indirect deps drop out — google/s2a-go,
  googleapis/enterprise-certificate-proxy, Azure SDK chain,
  cloud.google.com/go/auth, joho/godotenv, gonum, k8s.io/client-go,
  etc. All were sucked in by koanf v1's enterprise OTLP wiring.

  Test surface
  ------------
  Restore pkg/prometheus/prometheustest (noop Prometheus provider —
  same shape as nooprometheus) and pkg/query-service/rules/
  managertestfactory.go (TestManager + queryMatcherAny). Both were
  deleted with -tags signoz in 6619e74e1; the test files (manager_test,
  threshold_rule_test, prom_rule_test, querier_test) still depend on
  them in the default build. Wire managertestfactory to
  datastoreReader (renamed in 6619e74e1 from clickhouseReader).

  Revert overzealous datastore rename in three test files:
  srikanthccv/Datastore-go-mock → srikanthccv/ClickHouse-go-mock. The
  fork at /Users/z/work/hanzo/datastore-go-mock retains the upstream
  module identity so consumers don't have to bump import paths.

  Verification
  ------------
    go build ./...                                  clean
    go test -count=1 -run none ./...                clean (compiles)
    go list -deps ./... | grep -c grpc              0
2026-05-21 15:08:27 -07:00
zeekay cf30a85d5e feat(opamp): ZAP canonical, -tags grpc restores OTLP/OPAmp legacy
Reintroduces the real OPAmp config-push path behind //go:build grpc.
Default build (configure_ingestionRules_default.go): UpsertControlProcessors
returns errOpAmpUnavailable — ZAP-native ingestion is the canonical wire,
operators who need OTLP/OPAmp remote-agent control rebuild with -tags grpc.

Build matrix:
  go build ./...            → ZAP-only, 0 grpc in deps
  go build -tags grpc ./... → adds OPAmp config push + OTLP-gRPC trace exporter

Also includes ClickHouse Go deps replace directives at /Users/z/work/hanzo/
{datastore-go, datastore-sql-parser, datastore-go-mock} — local forks of
the three external module paths so we can patch them ZAP-native without
upstream coordination.
2026-05-21 13:58:56 -07:00
zeekay 6619e74e1f feat(o11y): kill -tags signoz + -tags otlp + -tags grpc, rename clickhouse → datastore
No more opt-in tag escape hatches — ZAP is the only path.

Deleted:
  pkg/prometheus/clickhouseprometheus/   (was -tags signoz, PromQL/ClickHouse adapter)
  pkg/prometheus/prometheustest/         (was -tags signoz, test provider)
  pkg/query-service/rules/managertestfactory.go (was -tags signoz)
  pkg/query-service/app/logparsingpipeline/preview.go  → preview_noop.go promoted to canonical
  pkg/query-service/app/opamp/{otelconfig/,configure_ingestionRules.go} (was -tags grpc)

luxfi/trace:
  exporter_otlp.go (was -tags otlp), exporter_grpc.go (was -tags grpc),
  exporter_noop.go all deleted. tracer.go simplified: Type=ZAP returns
  real exporter, everything else returns Noop.

Rename clickhouse → datastore (mirrors github.com/hanzoai/datastore brand):
  - dirs: pkg/telemetrystore/clickhousetelemetrystore → datastoretelemetrystore
          pkg/query-service/app/clickhouseReader → datastoreReader
          pkg/variables/clickhouse → datastore
          pkg/query-service/app/integrations/builtin_integrations/clickhouse → datastore
  - 151 files mass-renamed: Clickhouse → Datastore, clickhouse → datastore
  - External module paths preserved: github.com/ClickHouse/clickhouse-go/v2 (aliased as 'datastore')
    AfterShip/clickhouse-sql-parser, srikanthccv/ClickHouse-go-mock — names unchanged
  - External API surface preserved: sqlbuilder.ClickHouse (huandu/go-sqlbuilder enum)

Default-tag dep audit: 0 grpc, 0 grpc-gateway, 0 google api, 0 cloud auth, 0 s2a-go.
Build tags landed: NONE in o11y. ZAP-native is the only path.
2026-05-21 13:14:13 -07:00
zeekay c3f551121f merge feat/zapreceiver: ZAP-native o11y, 0 grpc default, IAM-only authz 2026-05-21 13:01:26 -07:00
zeekay 0a64dfdd6a feat(env): rename HANZO_ env vars → O11Y_
401 files touched. Pure prefix swap on env var literals and docs.
No semantic change — Go config layer was already prefix-driven.

All env vars now O11Y_* (e.g. O11Y_SQLSTORE_*, O11Y_TELEMETRYSTORE_*,
O11Y_INSTRUMENTATION_*, O11Y_ZAP_LISTEN, etc). Matches the module
path github.com/hanzoai/o11y and keeps o11y deployable as a
brandable component (no HANZO_ leak in operator-facing config).
2026-05-21 13:00:48 -07:00
zeekay 07ed478c9e feat(cmd/server): wire zap-native trace receiver alongside HTTP API
ZAP-native ingestion is now part of the o11y server lifecycle.
Listens on :4317 (HANZO_ZAP_LISTEN overrides), decodes zap envelopes
tagged MsgSpanBatch via pkg/zapreceiver, and is ready for SpanBatch
→ ClickHouse adapter wiring (TODO marker in OnBatch).

This is the ZAP-on-OTel ingest the project rule asks for — no
otlp-grpc, no grpc-gateway, no signoz-otel-collector receiver needed.
Spans shipped by luxfi/trace's Type=ZAP exporter land here over
plain TCP-framed luxfi/zap.
2026-05-21 12:47:44 -07:00
zeekay 6d472fdd7f feat(o11y): 0 grpc — opamp behind -tags grpc, inline signoz ArraySeparator
Default-tag o11y binary is now 100% grpc-free.

pkg/query-service/app/opamp/*: //go:build grpc for the three config-pulling
files (config_parser.go, configure_ingestionRules.go, plus its test).
Added configure_ingestionRules_noop.go for the default build —
UpsertControlProcessors returns errOpAmpDisabled. The grpc-gated path
keeps the full collector/confmap integration for callers building
with -tags grpc.

pkg/types/telemetrytypes/{field,json_access_plan}.go: inline
ArraySep = "[]." (was jsontypeexporter.ArraySeparator). One constant
import that dragged the entire signoz-otel-collector framework via the
exporter chain → consumer/consumererror → grpc/codes. Lifted the
value into the local package, dropped the import.

Verification:
  go list -deps ./...           → 0 google.golang.org/grpc importers
                                 → 0 grpc-gateway importers
  strings cmd/server | grep grpc → 1 hit (literal in error message)
  binary size                    → 113.4 MB

OPAmp remote-agent control is the only opt-in path. Build with
`-tags grpc` to re-enable for external OTLP integrations.
2026-05-21 12:42:30 -07:00
zeekay c9f4269506 feat(o11y): rip ee/ openfga google enterprise auth — IAM only
Per project rules 'kill auth module, use IAM for auth only' and 'no ee
is allowed in our o11y': all enterprise-edition + openfga + Google SDK
paths gone. Hanzo IAM is the single authorization integration point.

Deleted (10,217 lines):
  - cmd/enterprise/        (signoz EE binary)
  - ee/                    (anomaly, authn, authz/openfga*, gateway,
                            licensing, modules, querier, query-service,
                            sqlschema, sqlstore, zeus — all signoz EE)
  - pkg/authz/openfga{auth,schema,server}/ (openfga authz impls)
  - pkg/authn/callbackauthn/ (Google OIDC SDK — IAM owns this)
  - authn_{google,nogoogle}.go (split-build glue, redundant)

authn.go: NewAuthNs returns only email/password. External IdPs (Google,
SAML, OIDC discovery) happen at Hanzo IAM — o11y delegates via
pkg/authz/iamauthz.

Default-tag dep audit (./...):
    google.golang.org/grpc / grpc-gateway   → 0 importers in our code
    cloud.google.com/go/auth                → gone from go.mod
    google.golang.org/api/option            → gone from go.mod
    github.com/google/s2a-go                → gone from go.mod
    github.com/openfga/*                    → gone from go.mod

Remaining grpc symbols in cmd/server come from
go.opentelemetry.io/collector/consumer/consumererror (uses grpc/codes
as a status enum), pulled via signoz-otel-collector. Eliminating it
needs either forking otel/collector/consumer or replacing
signoz-otel-collector with our own pipeline — separate workstream.
2026-05-21 12:31:11 -07:00
zeekay 359ea6093b feat(o11y): decomplect google + prometheus engine + alertmanager from default
Per the project rule 'kill grpc period': decomplect every google.golang.org/grpc-pulling
transitive from the default-tag dep graph. Each surface follows the same
pattern — interface stays default + pure, prom/google impl gated behind
its feature tag, noop default keeps the wiring clean.

go.mod:
  + replace github.com/prometheus/alertmanager => /Users/z/work/hanzo/alertmanager
    Local fork of v0.31.0 with tracing/ package neutered to a noop
    (Manager.Run/ApplyConfig/Stop and Transport stay; OTLP-grpc imports gone).
    Without this, the upstream alertmanager always pulls otlptracegrpc → grpc.

authn:
  + authn_nogoogle.go (//go:build !google) + authn_google.go (//go:build google)
    registerOptionalAuthNs noop default; Google OIDC opt-in only.
    googlecallbackauthn/authn.go now //go:build google — its cloud.google.com/go/auth
    pulls github.com/google/s2a-go which pulls grpc.
  Hanzo IAM handles Google OIDC at the IAM layer.

prometheus engine:
  + pkg/prometheus/nooprometheus/provider.go — default factory.
    Empty promql.Engine + empty storage.Queryable; no PromQL queries but
    every interface contract is satisfied.
  pkg/prometheus/clickhouseprometheus/*.go (6 files) → //go:build signoz
    The clickhouse PromQL adapter pulls prometheus/prometheus/storage/remote
    which pulls storage/remote/googleiam → google api → s2a-go → grpc.
  pkg/prometheus/prometheustest/*.go (2 files) → //go:build signoz
    pkg/query-service/rules/managertestfactory.go → //go:build signoz
  provider.go: NewPrometheusProviderFactories registers nooprometheus.

Default-tag dep audit after this commit:
    go list -deps ./... | grep s2a-go             → empty
    go list -deps ./... | grep cloud.google.com   → empty
    go list -deps ./... | grep google.golang.org/api → empty
    go list -deps ./... | grep otlptracegrpc      → only via OTel collector
                                                    framework (next rip).

Remaining grpc transitive chain — single source:
  SigNoz/signoz-otel-collector → go.opentelemetry.io/collector/service
  → go.opentelemetry.io/contrib/otelconf → otlp{trace,log,metric}grpc → grpc

  Killing this means replacing the OTel collector ingestion pipeline
  with pkg/zapreceiver (ZAP-native span batch receiver, already built).
  15 files in o11y import signoz-otel-collector — they handle log/trace
  metadata via collector types. The replacement is a separate workstream:
  redefine those metadata types as plain Go structs, port the 15 files
  to use them, drop the signoz-otel-collector dep entirely.

After that, default-tag o11y is 100% grpc-free.
2026-05-21 10:35:08 -07:00
zeekay 8035c36fd2 feat(instrumentation): rip prometheus/client_golang, emit via luxfi/metric
Per the project rule "use ~/work/lux/metric, kill prometheus/client_golang":
the o11y instrumentation SDK now emits application metrics through
luxfi/metric — the canonical Lux scrape-compatible text format library.
Zero google.golang.org/protobuf in pkg/instrumentation, zero
google.golang.org/grpc, zero OTel-to-prometheus bridge.

pkg/factory/settings.go: ProviderSettings.PrometheusRegisterer → MetricsRegisterer
  (typed luxmetric.Registerer). ScopedProviderSettings interface follows.

pkg/instrumentation/instrumentation.go: Instrumentation interface gains
  MetricsRegisterer() luxmetric.Registerer in place of PrometheusRegisterer().

pkg/instrumentation/sdk.go: full rewrite.
  - drop go.opentelemetry.io/contrib/config dep (was the proxy that
    pulled prometheus/client_golang + every OTLP exporter
    unconditionally — including otlptracegrpc).
  - build the OTel TracerProvider directly from
    go.opentelemetry.io/otel/sdk/trace (noop by default; wire
    luxfi/trace with Type=ZAP for real export).
  - meter provider stays noop so OTel-instrumented libraries
    (otelhttp, otelgrpc) keep working.
  - luxmetric.NewRegistry() is the application metrics registry.

pkg/instrumentation/config.go: MetricsConfig collapses to {Enabled, Host,
  Port}. The /metrics endpoint is now served by the host process via
  metric.NewHTTPHandler(registry, opts). Resource.Attributes is plain
  map[string]any (no more contribsdkconfig.Attributes).

pkg/instrumentation/metric.go: DELETED. Was the otel→prom exporter
  bridge — gone with the dep.

pkg/instrumentation/instrumentationtest: noopInstrumentation uses
  luxmetric.NewRegistry().

pkg/alertmanager/service.go: Service owns its own prometheus.Registry
  for the prometheus/alertmanager-library boundary (dispatch / silence /
  notify / mem all require prometheus.Registerer from their public API).
  Documented as the next rip target.

pkg/alertmanager/alertmanagerserver/telemetry.go: reverted to prometheus
  types for the same boundary reason — alertmanager-library mandates them.

Default-tag dep audit:
    pkg/factory          → 0 prometheus/client_golang
    pkg/instrumentation  → 0 prometheus/client_golang, 0 contrib/config
    pkg/zapreceiver      → 0 prometheus/client_golang
    pkg/authz/iamauthz   → 0 prometheus/client_golang

Tests:
    pkg/instrumentation/... ok
    pkg/factory/...         ok
    pkg/zapreceiver/...     ok
    pkg/authz/iamauthz/...  ok

Remaining prometheus/client_golang lives only at the prometheus/alertmanager
library boundary (pkg/alertmanager/service.go, alertmanagerserver/{server,telemetry}.go,
types/alertmanagertypes/marker.go). Those files exist solely to pass the
prom.Registerer that upstream alertmanager requires. Killing them is the
alertmanager rip workstream — separate from this commit.
2026-05-21 02:41:39 -07:00
zeekay 0df91919ed feat(authz): rip openfga from core, use Hanzo IAM (kill auth module per project rule)
Per the project rule "kill auth module, use IAM for auth only": authz
core no longer references openfga proto types, and the openfga provider
is gated behind -tags openfga. Default builds ship iamauthz, which is
the integration point for Hanzo IAM (iam.hanzo.ai / iam.osage.id).

Core changes:
  - pkg/types/authtypes/tuple.go: define TupleKey as a plain Go struct
    (User/Relation/Object) — was *openfgav1.TupleKey. Same wire shape,
    no grpc/protobuf in the dep graph.
  - pkg/types/authtypes/typeable_*.go: every Tuples() method returns
    []*authtypes.TupleKey (was []*openfgav1.TupleKey).
  - pkg/types/roletypes/role.go: GetAdditionTuples / GetDeletionTuples
    return []*authtypes.TupleKey.
  - pkg/authz/authz.go: AuthZ interface uses authtypes.TupleKey; authz.TupleKey
    is now a type alias for authtypes.TupleKey for source-compat.
  - pkg/authz/schema.go DELETED — Schema interface was openfga-specific.
    Moved into openfgaschema package (build-tagged) where it belongs.

New default-build authz provider:
  - pkg/authz/iamauthz/provider.go: factory.ProviderFactory[authz.AuthZ]
    backed by Hanzo IAM. HTTP+JSON, zero gRPC, zero protobuf. All 22
    interface methods stubbed with errNotImplemented; wire each to the
    corresponding IAM endpoint as the integration matures. Check paths
    fail closed — no silent bypass.

openfga gated behind -tags openfga:
  - pkg/authz/openfgaauthz/provider.go
  - pkg/authz/openfgaschema/schema.go (now hosts the Schema interface)
  - pkg/authz/openfgaserver/{server,logger,sqlstore,server_test}.go
  - ee/authz/openfgaauthz/provider.go
  - ee/authz/openfgaschema/schema.go
  - ee/authz/openfgaserver/server.go

cmd/server/server.go + cmd/enterprise/server.go: replace openfgaauthz
factory with iamauthz factory in the default build path.

Result for pkg/authz/iamauthz dep graph:
    go list -deps ./pkg/authz/iamauthz | grep -E 'openfga|grpc-gateway|^google.golang.org/grpc$'
    → (empty)

Transitive grpc/otlp from prometheus/alertmanager and
go.opentelemetry.io/otel/exporters/otlp/* remains — the o11y collector
pipeline is fundamentally OTLP/protobuf at the framework level.
Eliminating that is a separate workstream: replace alertmanager OTLP
tracing with the ZAP-native exporter from luxfi/trace + receive at
pkg/zapreceiver.
2026-05-21 01:25:00 -07:00
zeekay 78b96e7719 feat(zapreceiver): ingest ZAP-native span batches from luxfi/trace
The receive side of luxfi/trace's default Type=ZAP exporter. Listens
on a TCP port (default :4317), decodes ZAP envelopes tagged
MsgSpanBatch, hands the JSON-decoded SpanBatch to a caller Handler.

  rcv, err := zapreceiver.New(zapreceiver.Config{
      Listen:  ":4317",
      OnBatch: func(ctx context.Context, b *SpanBatch) error {
          return clickhouseWriter.WriteBatch(ctx, b)
      },
  })

No protobuf, no OTLP, no gRPC. Pure luxfi/zap envelope + JSON payload.

receiver_test.go: round-trip — hand-built SpanBatch envelope sent
over zap.Node lands in the OnBatch callback with the expected
appName, version, resource, and span content. Stats counter
increments on successful ingest.
2026-05-21 00:44:51 -07:00
zeekayandGitHub 6c3644291a docs: canonical README opening + SECURITY.md (#4)
* docs: canonical README opening per Hanzo OSS taxonomy

* docs: add canonical SECURITY.md
2026-05-18 23:53:36 -07:00
zeekayandGitHub 73df683bff feat: cloud Mount() per HIP-0106 (#3)
* 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).
2026-05-18 23:36:39 -07:00
zeekay 94e44f4909 ci: amd64 only + id-token write
DOKS has no arm64 droplets (hanzo-build-linux-arm64 ARC paused). Default
shared workflow builds both arches and arm64 queues forever (24h timeout).
Caller permissions are also the ceiling for reusable workflow — without
id-token: write at top level dispatch dies as startup_failure.
2026-05-18 23:30:28 -07:00
zeekay 84df1156c4 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).
2026-05-18 23:16:51 -07:00
zeekay 28bbee02b3 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).
2026-05-18 22:23:19 -07:00
zeekay b20c2c87ea chore: bump go directive to 1.26.3 (security advisory) 2026-05-12 21:34:30 -07:00
zeekayandGitHub ebc234a065 ci: canonical docker-build (#2)
* feat: add /v1/o11y/* rewrite middleware for standard API path convention

Add URL rewrite middleware that intercepts /v1/o11y/* requests and
rewrites them to /api/* internally, allowing external clients to use
the /<version>/<service>/<path> convention while keeping all existing
internal route registrations unchanged.

* chore: sync latest

* ci: migrate to canonical hanzoai/.github/docker-build.yml reusable
2026-04-23 19:24:27 -07:00
zeekay bb2b1483af ci: migrate to canonical hanzoai/.github/docker-build.yml reusable 2026-04-23 19:17:50 -07:00
zeekay 7756d7b1ce chore: sync latest 2026-04-09 18:43:52 -07:00
zeekay 7d85f1e1b0 feat: add /v1/o11y/* rewrite middleware for standard API path convention
Add URL rewrite middleware that intercepts /v1/o11y/* requests and
rewrites them to /api/* internally, allowing external clients to use
the /<version>/<service>/<path> convention while keeping all existing
internal route registrations unchanged.
2026-04-09 17:51:51 -07:00
zeekay 1791c57181 chore: remove yarn.lock (migrated to pnpm) 2026-03-25 13:30:49 -07:00
zeekay 4bcfe8c9ce fix: add pnpm-lock.yaml + update CI workflows (yarn → pnpm) 2026-03-25 13:29:55 -07:00
zeekay 4f803f1600 chore: migrate frontend from yarn to pnpm
- Remove yarn.lock, generate pnpm-lock.yaml
- Update Dockerfile to use pnpm install --frozen-lockfile
- Convert package.json resolutions to pnpm.overrides
- Replace yarn references in postinstall script with pnpm
2026-03-25 13:20:00 -07:00
zeekay 0849c7514c ci: enable multi-arch builds (amd64 + arm64 native runners) 2026-03-24 22:47:26 -07:00
zeekay dae0eca69b ci: migrate Docker build to shared reusable workflow
Add multi-stage root Dockerfile (frontend + Go build + alpine
runtime) so the shared workflow can build everything in one
docker build. Replace the old build-ghcr.yaml (pre-build
outside Docker + thin COPY image) with a single call to
hanzoai/.github/.github/workflows/docker-build.yml@main.

amd64-only until arm64 runner is restored.
2026-03-24 22:32:55 -07:00
zeekay 208dd79a4b fix: resolve frontend build failures with rolldown-vite postcss-import
Three categories of fixes:

1. CSS @import paths: rolldown-vite's postcss-import cannot resolve
   bare 'styles/tokens/...' paths that relied on tsconfig baseUrl.
   Changed to explicit relative paths (./styles/... or ../../styles/...).

2. Missing @hanzo/ui exports: ComboboxCommand/ComboboxTrigger/etc and
   RadioGroupLabel do not exist in @hanzo/ui v5.6.0. Replaced Combobox
   compound component with antd Select, RadioGroupLabel with Label.

3. Unresolved optional peer deps: @hanzo/ui eagerly imports next-themes,
   react-hook-form, mermaid, etc at module level. Added rollupOptions.external
   for unused deps; installed react-resizable-panels and react-day-picker
   which are actually used.

Also fixed SolidAlertCircle -> CircleAlert (correct lucide-react export).
2026-03-24 21:36:13 -07:00
zeekay 9b50f20938 ci: add multi-env Docker image tagging for test/dev branches
Replace rebrand/hanzo-o11y branch trigger with test and dev. Existing
metadata-action tags (type=ref,event=branch) produce :test and :dev
image tags automatically.
2026-03-24 20:55:40 -07:00
zeekay a50d61bd9a fix: update frontend yarn.lock for frozen-lockfile CI compatibility
yarn.lock was out of date after package.json changes in rebrand commits.
CI builds with --frozen-lockfile were failing. Also remove deprecated
build-community.yaml and build-enterprise.yaml workflows.
2026-03-24 20:09:11 -07:00
zeekay 9b28da4046 feat: rename X-HANZO-QUERY-ID → X-O11Y-QUERY-ID
Generic header prefix for observability query correlation.
Also includes zap→slog migration in server startup logging.
2026-03-24 18:44:29 -07:00
zeekay abb3113551 chore: bump Go 1.26.1 2026-03-22 14:21:58 -07:00
zeekay 772ce4a050 rebrand: replace SF Mono with Geist Mono in remaining token vars
- style.css: 8 SF Mono font-family declarations → Geist Mono
- style.css: --font-family-sf-mono var → --font-family-geist-mono
- RawLogView/styles.ts: SF Mono → Geist Mono
2026-03-13 13:44:27 -07:00
zeekay b8951f7d76 rebrand: Geist Sans/Mono fonts, purge all legacy fonts and .signoz- selectors
- Replace Inter (478 occurrences) → Geist Sans across all SCSS/CSS/TS
- Replace Space Mono (90+) → Geist Mono across all SCSS/TSX
- Replace Work Sans (6) → Geist Sans
- Replace Fira Code / SF Mono → Geist Mono
- Replace Satoshi → remove (use Geist Sans)
- Remove legacy Google Fonts imports (Work Sans, Space Mono, Fira Code)
- Rename .signoz-modal → .o11y-modal, .signoz-radio-group → .o11y-radio-group
- Replace font-inter Tailwind class → font-sans
- 170 files changed
2026-03-13 13:01:16 -07:00
zeekay b8a4578a7d rebrand: purge remaining SigNoz refs from frontend scripts and README
- .eslintrc.cjs: SigNoz Frontend → Hanzo O11y Frontend
- generate-permissions-type.cjs: SIGNOZ_INTEGRATION_IMAGE → O11Y_INTEGRATION_IMAGE, error messages rebranded
- update-registry.cjs: SigNoz GitHub PR link → hanzoai/o11y
- README.md: signoz docker/git refs → hanzoai/o11y
2026-03-13 12:35:43 -07:00
zeekay 46a95a23b2 rebrand: Geist Sans font, purge remaining upstream names
- Replace Google Fonts Inter with Geist Sans CDN in index.html
- Update 28 font-family tokens from Inter → Geist Sans in design tokens
- Update 26 hardcoded 'Inter' font refs in SCSS/CSS → 'Geist Sans'
- Rename --font-family-inter → --font-family-geist CSS variable
- Fix ClickHouse → Datastore in i18n locale files (en, en-GB)
- Fix 'Signoz Theme Tokens' comment → 'Hanzo O11y Theme Tokens'
- Fix signoz.io URL in snapshot test
2026-03-13 12:28:55 -07:00
zeekay a0b7a2c1f1 rebrand: purge posthog, clickhouse, signoz from frontend
- posthog-js → @hanzo/insights, all variable names posthog → insights
- POSTHOG_KEY → INSIGHTS_KEY across env, vite config, CI workflow
- clickhouse → datastore: types, enums, components, directories (386 occurrences)
- ChQuerySection → DsQuerySection directory and component rename
- signoz → o11y/hanzo in all onboarding docs, URLs, brand text
- X-SIGNOZ-QUERY-ID → X-O11Y-QUERY-ID header
2026-03-13 12:16:06 -07:00
zeekay e9108486b0 feat(auth): disable password login, IAM OIDC only
All authentication must go through Hanzo IAM (hanzo.id) OIDC.
Password login returns 501 Unsupported directing users to SSO.
Auth domain config updated with roleMapping (useRoleAttribute=true,
defaultRole=ADMIN) so IAM role claims map to O11y roles.
2026-03-12 18:27:08 -07:00
zeekay 41be44140c fix(authz): allow digits in role selector regex
Role names like o11y-admin contain digits which caused
MustNewSelector to panic on every ViewAccess/EditAccess/AdminAccess
route, returning 502 to the client.
2026-03-12 17:54:44 -07:00
zeekay 4a214e4a4a fix: defensive error handling for API responses
- ErrorResponseHandlerV2: safely access response.data?.error fields
  to prevent crash when error response lacks expected structure
- useGetTenantLicense: check method existence before calling
  getHttpStatusCode() to prevent crash on non-APIError errors
- render.go: add Content-Type: application/json header to error
  responses (was missing, causing browser XML parsing warnings)
2026-03-12 17:43:55 -07:00
zeekay 84200d3804 fix(auth): handle OIDC callback tokens at app init before routing
The OIDC callback redirects to /?accessToken=...&refreshToken=... but
the Login component only lives at /login, so tokens were never picked
up. The Private route handler then saw isLoggedIn=false and redirected
to /login, which triggered another OIDC redirect — infinite loop.

Fix: intercept tokens from URL params at module load time (before any
React component renders) and store in localStorage. This ensures
getUserDefaults() and isLoggedIn state both read the correct values.
2026-03-12 16:23:07 -07:00
zeekay b6226be30f rebrand: rename "Hanzo Observability" to "Hanzo O11y" everywhere
Update page titles, meta tags, manifest, auth headers, login page,
signup page, onboarding header, and generated API comments to use
"Hanzo O11y" branding instead of "Hanzo Observability".
2026-03-12 16:13:15 -07:00
zeekay a582fff079 fix(session): remove root user SSO restriction
Root users were blocked from OIDC SSO login with "root user can only
authenticate via password". Since we use IAM for all auth, root user
concept is irrelevant — allow SSO for all users regardless of is_root.
2026-03-12 16:02:09 -07:00
zeekay 1ff676a740 fix(oidc): make license check non-blocking in OIDC callback
The licensing check in HandleCallback was returning an error when no
active enterprise license existed, completely blocking OIDC SSO login.
Changed to log a warning instead, allowing SSO authentication to
proceed without a license.
2026-03-12 15:21:08 -07:00
zeekay 2c8144bea2 feat(login): auto-redirect to IAM OIDC instead of showing email/password form
Remove the built-in email/password login form entirely. On page load,
the Login component now fetches the OIDC redirect URL from the backend
via sessions/context API and immediately redirects to hanzo.id for
authentication. Only shows UI for loading state, OIDC callback token
processing, and error display with retry.
2026-03-12 15:18:58 -07:00
zeekay 48bbf7ea3a rebrand: replace all HanzoO11y with Hanzo, use Hanzo H logo
- Replace TV icon and observe-brand-logo with hanzo-icon.svg
- Add hanzo-brand-logo.svg and hanzo-icon.svg to public/Logos/
- Copy Hanzo favicon.ico and favicon PNG
- Update all user-facing strings: HanzoO11y → Hanzo
- Update page title to "Hanzo Observability"
- Update meta tags (og:title, og:description, og:image)
- Update manifest.json with Hanzo branding
- Fix GitHub URLs to hanzoai/o11y
- Keep @signozhq/* npm packages (not yet published as @hanzo/*)
2026-03-12 14:46:09 -07:00
zeekay 048cab34ba fix(go): use signozlogspipelineprocessor package name in preview.go 2026-03-12 03:00:51 -07:00