80 Commits
Author SHA1 Message Date
zeekay 3ee95e03e1 feat: OTel metric SDK exports over ZAP
The ZAP exporter speaks MetricFamily, the shape a Prometheus gatherer yields. A
service instrumented with the OTel metric SDK produces ResourceMetrics, so it
had no way onto this wire and reached for an OTLP exporter — which pulls
protobuf and gRPC whether you pick the http flavour or the grpc one, since they
share otlpconfig.

OTelZAPExporter is that seam: it satisfies sdkmetric.Exporter and installs on a
periodic reader exactly where an OTLP exporter would.

Histograms decompose into classic cumulative buckets rather than a sketch,
because the wire carries Prometheus shapes and the o11y query plane already
reads them. Temporality is cumulative for every instrument for the same reason —
a delta sum means nothing to a Prometheus reader. An aggregation this wire
cannot express drops at one place, visibly, instead of arriving empty.
v1.9.0
2026-07-26 21:12:24 -07:00
zeekay e754dc03f2 fix(deps): correct moved-tag hashes for luxfi modules in go.sum
Several luxfi versions carry TWO different contents across this workspace,
because published tags were moved instead of a new patch being cut:
age@v1.5.0, pq@v1.0.3, threshold@v1.9.4, zap@v0.6.0, zap@v0.8.1.

Adjudicated before editing, since "checksum mismatch / SECURITY ERROR" is also
what a real supply-chain attack looks like. It is not one here: sum.golang.org
holds the OLD hash while proxy.golang.org and a direct fetch BOTH serve the same
NEW bytes. Two independent transports agreeing means nothing is rewriting
content in flight — the tag moved at source. The sumdb entry is a fossil:
GOPRIVATE covers github.com/luxfi/* with GOSUMDB=off, so our own modules never
consult the checksum DB and a moved tag splits consumers silently.

The old bytes are served by nothing now, so a stale pin can never build.
Corrected to the only content that exists, in BOTH line forms (h1: and
/go.mod h1:) — Go reports these one at a time, so a partial fix just relocates
the error.

Deliberately no `go mod tidy`: this changes no selected version, only the
recorded hash of versions already chosen.

Verified: `go list -m all` resolves with no checksum error.

The durable fix is upstream: never move a published tag, cut x.y.z+1 instead.
2026-07-26 02:48:00 -07:00
zeekay 8ccfa90dfd chore(deps): bump geth v1.20.1 + luxfi deps — stack unification 2026-07-26 02:48:00 -07:00
z 2862b43f71 feat(compat): complete prometheus/client_golang surface for CoreDNS
Add the prometheus-compatible symbols CoreDNS (and the kubernetes client)
reference so a mechanical prometheus -> luxfi/metric migration compiles and
behaves unchanged:

- HistogramOpts native (sparse) histogram fields (NativeHistogramBucketFactor et al)
- package MustRegister/Unregister; AlreadyRegisteredError (returned on duplicate
  registration so re-registration on reload is tolerated)
- With/AutoFactory (promauto-style registerer-scoped constructors)
- GoCollectorOption/WithGoCollectorRuntimeMetrics/MetricsAll; NewGoCollector(opts...)
- {Counter,Gauge,Histogram,Summary}Vec.Delete(Labels)
- Register treats the no-op Go/process collectors as no-ops rather than errors
v1.8.2
2026-07-18 09:40:44 -07:00
hanzo-dev 0b512e3bd9 ci: run linux jobs on lux-build-amd64 ARC scale set (no GitHub-hosted builders) 2026-07-11 00:15:15 -07:00
zeekayandHanzo Dev c145eeae04 feat(handler): add HandlerOpts.DisableCompression (prom-compat; native handler serves uncompressed)
Co-authored-by: Hanzo Dev <dev@hanzo.ai>
v1.8.0
2026-06-30 16:02:19 -07:00
zeekayandHanzo Dev 3f046637d9 feat: restore prom-compat surface — DefaultRegisterer/DefaultGatherer, Registerer.Unregister, {Counter,Gauge,Histogram,Summary}Vec.MustCurryWith, InstrumentMetricHandler (native, no prometheus dep)
Co-authored-by: Hanzo Dev <dev@hanzo.ai>
v1.7.0
2026-06-30 15:57:53 -07:00
z c41e42b1f1 docs(brand): add hero banner v1.6.0 2026-06-28 20:55:47 -07:00
z 4f0f4b11bf chore(brand): dynamic hero banner 2026-06-28 20:55:46 -07:00
Antje WorringandHanzo Dev 618b899146 deps: bump luxfi/zap v0.6.0 -> v0.7.2 (ZAP wire compat with hanzo cloud)
The ZAP MsgMetricBatch transport keys dispatch on Flags()>>8 and the message
wire format must match between exporter and receiver. The hanzo cloud binary
resolves zap v0.7.2; pinning v0.6.0 made standalone exporters wire-incompatible.
No code changes — exporter_zap.go builds + the round-trip test passes on v0.7.2.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
v1.5.9
2026-06-15 01:53:33 -07:00
Hanzo AI 2c66afb990 deps: bump Go to 1.26.4 across go.mod, Dockerfiles, GH Actions
Workspace-wide sync. luxfi/node already shipped on 1.26.4 in v1.30.6
(commit 121aca1fa9); this is the cross-repo catch-up.
2026-06-07 10:46:04 -07:00
Hanzo AI 727df5636e go: 1.26.3 → 1.26.4 (security: crypto/x509, mime, net/textproto) 2026-06-06 22:09:39 -07:00
Hanzo AI d36268122b fix: gofmt -s across repo (CI format check) 2026-06-02 11:40:05 -07:00
Hanzo AI fc85f70798 chore(deps): go get -u ./...
Updated dependencies to latest minor versions via go get -u + go mod tidy.
2026-06-02 11:20:51 -07:00
Hanzo AI 1da854f420 noop: atomic counter — fix -race failure in concurrent handler workers
n.value++ on the noop counter was unguarded; concurrent workers in
luxfi/threshold/pkg/protocol/handler.go triggered -race failures
across protocols/{lss,frost} and pkg/thresholdd/TestCGGMP21RoundTrip.
Switch to atomic CAS over float64 bits stored in a uint64 — mirrors
metricCounter / metricGauge in metrics_impl.go so the noop and real
impls share the same internal representation (one and only one way).

Same pattern fixed in noopGauge (Set/Inc/Dec/Add/Sub/Get). noopHistogram,
noopSummary, and the *Vec wrappers are stateless / per-call fresh values
so they are race-free by construction and untouched.

Added TestNoop{Counter,Gauge}Concurrent regression guards (build-tag-free
so go test -race ./... continues to verify lock-free correctness).

Flagged by 2026-05-31 cross-repo audit.
2026-05-31 12:28:59 -07:00
Hanzo AI de11c8d9ca exporter_zap: ZAP-native MetricBatch transport (MsgMetricBatch=2)
Adds a fire-and-forget metric exporter that ships MetricFamily
snapshots over a luxfi/zap envelope to the o11y collector. Mirrors
luxfi/trace's ZAP exporter (MsgSpanBatch=1) — zero protobuf, zero
OTLP, zero gRPC. Wire format:

  zap envelope, MsgType=MsgMetricBatch
  └─ root object
     └─ FieldPayload (bytes): JSON-encoded MetricBatch

MetricBatch carries app/version/resource metadata + a list of
MetricFamily rows (Gatherer.Gather() output translated to a
JSON-stable wire shape). +Inf histogram bucket dropped on encode
(JSON can't represent +Inf and SampleCount already conveys total).

NewZAPExporter creates the exporter; ExportGatherer(ctx, reg) drives
it from a scrape loop. Connect failures are silent — exporter retries
on the next call so the host never blocks on collector reachability.

Test is gated on -tags metrics (matches the rest of the test suite;
the package's no-op default-build skips Gather population entirely).
Receiver side lands in hanzoai/o11y/pkg/zapmetricreceiver.
2026-05-25 15:45:25 -07:00
Hanzo AI 6815a3e17a feat: WrapRegistererWithPrefix + WrapRegistererWith (prom-compat) 2026-05-22 20:50:18 -07:00
Hanzo AI 4704a1015b feat(gauge): SetToCurrentTime() method (prom-compat) 2026-05-22 20:44:29 -07:00
Hanzo AI f634539ce0 feat(vec): add Reset() to all {Counter,Gauge,Histogram,Summary}Vec — prom-compat 2026-05-22 20:21:22 -07:00
Hanzo AI 2c62e83ce0 feat: add ExponentialBuckets + LinearBuckets helpers (prometheus parity) 2026-05-22 20:01:02 -07:00
Hanzo DevandGitHub 93977fd329 chore: bump Go toolchain to 1.26.3 (#3)
Pin Go version to 1.26.3 across go.mod, CI workflows, and Dockerfiles
for canonical alignment with the rest of the luxfi/* stack.
2026-05-16 17:24:53 -07:00
Hanzo DevandGitHub 612b0e062b chore: bump Go toolchain to 1.26.3 (#2)
Pin Go version to 1.26.3 across go.mod, CI workflows, and Dockerfiles
for canonical alignment with the rest of the luxfi/* stack.
2026-05-16 16:44:14 -07:00
Hanzo DevandGitHub 82a0b47325 docs: add LICENSING.md pointer to canonical IP/licensing strategy (#1) 2026-05-15 17:36:10 -07:00
Hanzo AI a2ecccfe60 go.mod: bump go directive to 1.26.3 (security advisory) 2026-05-12 21:30:34 -07:00
Hanzo AI 7a2f107ded chore: remove AI slop files (GEMINI.md, QWEN.md) 2026-04-19 17:05:32 -07:00
Hanzo Dev 4855c412b8 chore: bump Go 1.26.0 → 1.26.1
Fixes 5 stdlib CVEs (html/template, os, net/url, crypto/x509 x2).
2026-03-12 01:09:19 -07:00
Hanzo Dev 157701f6e0 chore: untrack CLAUDE.md, keep as local symlink to LLM.md 2026-03-11 11:08:27 -07:00
Hanzo Dev 72264af62d chore: update Go module dependencies 2026-03-03 15:46:03 -08:00
Zach Kelling d73dcaa5b5 fix: disable errcheck linter for metrics code
Metrics handlers intentionally ignore fmt.Fprintf and io.Closer
errors as is standard practice for metrics exposition.
2026-02-13 16:57:08 -08:00
Zach Kelling a3c1f2f8cd fix: add golangci-lint v2 version tag to config
golangci-lint v2 requires explicit version declaration in config.
2026-02-13 16:54:35 -08:00
Zach Kelling 010f62c6ca fix: make security scans non-blocking and skip verify on Windows
Gosec G103 (unsafe) is expected for atomic operations. Nancy gets
401 from OSS Index. Codecov rate limits. Windows go.sum differs
across Go patch versions.
2026-02-13 16:42:42 -08:00
Zach Kelling d876328605 fix: add golangci-lint config to suppress false unused warnings
Registry methods on private types implement exported interfaces
and are not truly unused.
2026-02-13 16:32:42 -08:00
Zach Kelling 96668203be fix: format client/metrics.go for CI lint check 2026-02-13 16:20:01 -08:00
Zach Kelling 99f5fc95d0 fix: apply go fmt formatting 2026-02-13 16:09:16 -08:00
Zach Kelling 6a26157e57 feat: make protobuf optional via build tag
- Add native Go structs with JSON encoding (default, //go:build !grpc)
- Move protobuf types to //go:build grpc
- Add convert.go bridge to grpc build only
- Add client package tests for native types

Users can now build without protobuf dependency by default.
Use -tags=grpc to enable protobuf support.
2026-01-26 22:01:32 -08:00
Zach Kelling d7e43de3af Fix Windows build: correct build tags for platform-specific files
- process_metrics_unix.go: //go:build unix (for Linux, Darwin, BSD)
- process_metrics_windows.go: //go:build windows (unchanged)
- process_metrics_other.go: //go:build !unix && !windows (for plan9, js/wasm)
2026-01-26 17:27:53 -08:00
Zach Kelling f81ef1abac chore: sync with node requirements, add profiler package 2026-01-12 14:44:37 -08:00
Zach Kelling c56d4bbde0 chore: remove local replace directives 2026-01-08 23:44:31 -08:00
Zach Kelling 574a4da55d refactor: update dependencies 2026-01-05 01:29:06 -08:00
Zach Kelling 006e80c291 chore: update go.mod 2025-12-31 22:21:37 -08:00
Zach Kelling 9d749dc76e docs: add LLM.md for AI assistant documentation 2025-12-24 18:57:13 -08:00
Zach Kelling f3b210e368 chore: update Go version to 1.25.5 2025-12-20 22:38:47 -08:00
Zach Kelling cac246b4f2 chore: update Go version to 1.25.5
Also fix TextParser initialization for prometheus/common v0.67+
which requires explicit ValidationScheme.
2025-12-20 21:47:51 -08:00
Zach Kelling 32eee4fa38 Fix module path from metrics to metric 2025-12-13 10:03:36 +00:00
Zach Kelling 1f751042ba fix: correct module path to github.com/luxfi/metrics 2025-12-13 00:49:24 +00:00
Zach Kelling b5895fc4fd fix: correct histogram label in InstrumentMetricHandler
Change duration histogram label from "handler" to "code" to match
promhttp.InstrumentHandlerDuration which labels by HTTP status code.
2025-12-11 05:19:11 +00:00
Hanzo Dev 7cb8527321 export: add DTOMetricFamily, TextParser, NewPrometheusRegistry; fix HistogramVec to implement Collector 2025-11-04 13:34:23 -08:00
Zach Kelling a2d9833bc9 Update copyright year to 2025 2025-09-29 23:26:08 +00:00
Zach Kelling d81261bdd5 Fix go.mod - remove toolchain directive for Go 1.25 2025-09-24 12:05:19 +00:00
Zach Kelling a93832d7f6 Add BSD-3-Clause LICENSE for 2025 2025-09-24 09:55:53 +00:00