Replace gcr.io/distroless/base@sha256:${DISTROLESS_SHA} with the
Hanzo-mirrored ghcr.io/hanzoai/debian12:base@sha256:${DISTROLESS_SHA}.
SHA passed in via build-arg is preserved so caller pin discipline
remains identical; only the registry/path changes.
TODO flagged: CI workflows pulling this base may need a PAT secret
(GHCR_PULL_TOKEN) since the default GITHUB_TOKEN scopes to the repo's
own package only.
#### Chores
- Align the signoz assets (templates, web) with the signoz tarball
structure in systemdcasting
- Update the systemdcasting to help folks with downloading binary and
with instructions on keeping things aligned
Related: https://github.com/SigNoz/platform-pod/issues/2347
#### Summary
Introduces a per-Kind `Planner` contract so Foundry can drive multiple
casting Kinds through a single pipeline. `Foundry.Forge` / `Cast` /
`Gauge` become Kind-agnostic; per-Kind state (registry, moldings,
casting strategy, enricher) lives in the Kind's own Planner.
#### Changes
- New `internal/planner` package defining the `Planner` contract.
- `Foundry` holds a `Planners` dispatch map; each casting package
implements the contract (`installation.Planner`,
`collectionagent.Planner`).
- Installation registry moves from `internal/foundry/registry.go` to
`internal/casting/installation/registry.go`.
- CollectionAgent Kind scaffolded: Planner + collector molding wired
end-to-end. No deployment castings yet.
- `MoldingKindCollector` added to `api/v1alpha1/molding_kind.go`.
Related: https://github.com/SigNoz/platform-pod/issues/1971,
https://github.com/SigNoz/platform-pod/issues/1972
#### Fixes
- Templated the signoz and ingester services with a replicaIdx suffix
- Fixed volume names to respect signoz replicaIdx for the sqlite
metastore
- Fixed port collisions for replicas of signoz and ingester
#### Fixes
- Render templated per-node macros (`shard`, `replica`) in ClickHouse
`config.yaml` so multi-shard/multi-replica clusters get unique Keeper
paths instead of collisions
- Use the first TelemetryStore TCP address (not comma-joined) for
`SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN` and ingester ClickHouse DSNs
#### Refactors
- `telemetrystore` molding now emits `config-{shard}-{replica}.yaml` per
node (mirrors `telemetrykeeper` per-replica pattern)
Related: https://github.com/SigNoz/platform-pod/issues/1332
## Summary
Reshape foundryctl's output contract so it composes with agents and
shell pipelines. Three changes that fall out of the same observation:
**stdout, stderr, and exit codes should be a stable contract — today
they're conflated.**
- **Logger to stderr, silent by default.** `instrumentation.NewLogger`
writes to `os.Stderr` (was `os.Stdout`) and uses `slog.DiscardHandler`
unless `--debug` is set. Matches helm/aws CLI convention. stdout is now
reserved for command results.
- **Typed exit codes.** `internal/errors.typ` carries a `code int`
field; `errors.ExitCode(err)` walks the wrap chain via `errors.As` and
returns a deterministic code: `InvalidInput=2, NotFound=3,
Unsupported=4, Internal=5, Fatal=6`, untyped=1, nil=0. Compact 1-6
scheme rather than sysexits.h because sysexits would collapse `Internal`
and `Fatal` into the same `EX_SOFTWARE (70)`, losing a distinction we
care about (Fatal = recovered panic; Internal = expected-but-failed
path). `cmd/foundryctl/main.go` now exits with `errors.ExitCode(err)`.
- **`fmt.Errorf` forbidden by lint.** New forbidigo rules in
`.golangci.yml` ban `fmt.Errorf` and `fmt.Print*` / `print` / `println`.
168 call sites across 38 files converted to `errors.Newf` /
`errors.Wrapf` with contextually-chosen types. Narrow exception for
`internal/errors/error_test.go` so the ExitCode wrap-chain test stays
authentic.
Sites of note for review:
- `internal/errors/type.go` — exit code mapping table (one source of
truth)
- `internal/errors/error.go` — `ExitCode(err)` helper
- `internal/instrumentation/logger.go` — `slog.DiscardHandler` default
- `.golangci.yml` — forbidigo config + the single narrow test exclusion
## Test plan
- [x] `go build ./...`
- [x] `go test ./...` (all packages pass; new `TestExitCode` covers 9
cases: nil, untyped, each typed, fmt.Errorf-wrapped,
foundry-Wrapf-wrapped)
- [x] `golangci-lint run ./...` — 0 issues
- [x] Manual: `foundryctl forge` on a missing file exits non-zero and
emits nothing on stdout (logs hidden); `--debug` emits JSON on stderr
only
- [x] Manual: end-to-end forge + cast against the docker/compose flavor
still produces a healthy stack
### Summary
- Introduce a `kind` discriminator for Casting. Existing Casting without
a kind field keep working, empty kind defaults to `Installation`
- New `api/v1alpha1/installation/` subpackage with the Installation
Casting, Spec types and holds its own JSON schema from its Go type:
`installation/casting.schema.json`
- New Machinery interface in `api/v1alpha1/machinery.go` exposes
`Kind()` and `TrackableProperties()` so Dispatcher(Getv1alpha1 and
Forge/Cast/Gauge) work across any kind without knowing its concrete
type.
- A root casting.schema.json lists every per-Kind schema to supports
IDEs completion from one schema URL
- cmd/foundryctl gen schemas reads a list of types from schemaTargets.
Adding a kind means adding one entry.
Related: https://github.com/SigNoz/platform-pod/issues/1970
## Summary
- Extract \`DistinctID\`, \`Event\`, and \`Properties\` value objects
from \`internal/ledger\` into \`internal/domain\` so they can be reused
without coupling callers to ledger orchestration. Move the analytics
serializer to \`api/v1alpha1\` as \`Casting.TrackableProperties()\`.
Tighten \`Ledger.Track\` to take \`domain.Event\` and
\`domain.Properties\`.
- Add \`cmd/foundryctl/root.go\` with shared
\`rootLogger\`/\`rootTracker\` initialized via \`PersistentPreRunE\`,
plus \`recoverRunE\` — a wrapper that converts panics to \`TypeFatal\`
errors and centralizes log + ledger tracking of success/failure for
every command. Each \`runX\` collapses to \`(domain.Properties, error)\`
with no in-function tracking.
- Add \`WithStacktrace\` on \`*base\` errors so the recovered panic
stack flows through the existing \`LogAttr\` machinery.
## Summary
- Adds `scripts/install.sh` : a curl-pipe-bash installer for foundryctl,
served from `signoz.io/signoz.sh` (Vercel rewrite to this repo's
`main`).
- Detects OS/arch (darwin, linux, windows shells; amd64, arm64),
resolves the latest version via the GitHub `/releases/latest` redirect
(no API rate-limit), downloads the tarball + verifies SHA-256 against
the published checksums file, installs into `$FOUNDRY_INSTALL_DIR` →
`$XDG_BIN_HOME` → `~/.local/bin`, and runs the binary as a post-install
smoke test.
- Idempotent: same-version re-runs short-circuit early;
different-version runs prompt interactively, auto-proceed when piped
(curl-pipe-bash, CI). `-y` / `FOUNDRY_ASSUME_YES` bypasses the prompt
explicitly.
- Wires `sh-fmt` and `sh-lint` jobs into `ci.yaml` (via
`signoz/primus.workflows`) so the script is enforced against shellcheck
and shfmt on every PR.
Related: SigNoz/platform-pod#2065,
https://github.com/SigNoz/foundry/issues/96,
https://github.com/SigNoz/foundry/issues/97
## Summary
- `Template` now carries its `Format` end-to-end. Each format declares
its `Material` constructor inline (`FormatYAML = Format{s: "yaml", new:
...}`), so adding a format is one `var` entry — no switch in `Render`,
no per-callsite dispatch.
- New `Template.Render(data, path) (Material, error)` replaces the
`Execute` → `bytes.Buffer` → `NewXMaterial` trio duplicated across
`ecsterraformcasting`, `kuberneteskustomizecasting`, `systemdcasting`,
and `infrastructure/terraform/generator`. Net −165/+259, but most of the
+s are the new test file.
- Errors flow through `internal/errors` (`TypeInvalidInput` /
`TypeInternal` / `TypeUnsupported`) using the project's `failed to
create <X> from %q: <reason>` wording, matching the recent `Material`
and `Address` refactors.
- Drop `Get` prefix on accessors: `Name()`, `Path()`, `Format()`.
- `internal/domain/template_test.go` covers `Render` across every format
plus the unsupported-format and invalid-output paths.
## Summary
- Carry scheme on `domain.Address` so the round-trip `Parse → String` is
lossless; bracket IPv6 hosts on render.
- Single construction path: `ParseAddress` delegates field validation to
`NewAddress`. Add `MustNewAddress` and rename the slice constructor
`NewAddresses` → `ParseAddresses` (it parses strings).
- Port is optional — `0` means unset and is dropped from `String`, so
`tcp://signoz` and `tcp://[::1]` round-trip cleanly.
- Drop `FormatAddress`; casting enrichers now use
`domain.MustNewAddress(...).String()`.
- Error messages aligned with the material-domain wording (`failed to
create address[ from %q]: <reason>`).
- Adds `internal/domain/address_test.go` covering hostname / IPv4 /
IPv6, port-less variants, parse round-trip, and slice error propagation.
## Summary
- Split material domain into writer-facing `Material` and
traversal-capable `StructuredMaterial` interfaces with concrete
`YAMLMaterial`, `JSONMaterial`, `INIMaterial`, and `BlobMaterial` types.
- Inline INI and YAML format helpers into their respective material
types and remove `format.go` and `ini.go`.
- Rename interface methods for clarity: `Contents` → `JSONContents`,
`WithContents` → `CloneWithJSONContents`, `IsMultiDoc` →
`HasMultipleDocuments`.
- Switch material constructors to `internal/errors` with
`TypeInvalidInput` for parse failures, `TypeInternal` for canonical-JSON
marshaling failures, and `TypeNotFound` for missing traversal paths.
- Add `MustNew{JSON,YAML,INI}Material` constructors and split tests into
per-type `*_material_test.go` files.
- Tighten interface doc comments to follow godoc convention (lead with
identifier, drop pure restatement, document the gjson dotted-key path
syntax).
- Move `ini.PrettyFormat = false` into a package `init()` so the global
is touched once instead of on every `FmtContents` call.
## Summary
- Rename internal/types to internal/domain
- Update imports and call sites to use the domain package
- Document the domain package boundaries
- Remove api/v1alpha1 dependency on internal/domain
## Tests
- GOCACHE=/private/tmp/foundry-go-cache go test ./...
## Summary
- Wires schema-based validation of `casting.yaml` at config load time.
Schema is generated from the Go types via `swaggest/jsonschema-go`,
embedded as `api/v1alpha1/schema.json`, and validated post-merge with
`google/jsonschema-go`.
- Adds field-level rules: `required`, `enum`, `pattern` (DNS-1123 name,
JSON Pointer paths, OCI image), `minimum`/`minLength`/`minItems` on the
relevant fields. `additionalProperties:false` is set on every nested
type for the published schema.
- Replaces the loose string `Platform` / `Mode` / `Flavor` on
`TypeDeployment` with typed enums following the existing `*Kind`
pattern. Bad values now fail at unmarshal with a clear "invalid
deployment …" message.
- Drops `InfrastructureProvider` in favor of `Platform` — the cloud
subset (aws, gcp, azure) drives the Terraform IaC pipeline directly.
`ResolveProvider` collapses `PlatformECS → PlatformAWS`.
- Side cleanups bundled here: typed errors in `internal/errors` with
stacktrace capture (used by yamlconfig to wrap validation failures as
`TypeInvalidInput`), and removal of the custom pretty slog handler in
`internal/instrumentation` in favor of `slog.NewJSONHandler`.
## Test plan
- [ ] `make gen-schemas` is idempotent (CI's `schemas` job stays green).
- [ ] `go test ./...` passes locally.
- [ ] Every committed example casting (`docs/examples/**/casting.yaml`,
`docs/standalone/casting.yaml`) loads without error.
- [ ] Negative cases at config load: bad `apiVersion`, missing required
fields, unknown enum values for `kind` / `mode` / `flavor` / `platform`
/ patch `op`, non-JSON-Pointer patch paths, negative `replicas`,
`shards: 0`, malformed image refs — each fails with a `TypeInvalidInput`
error pointing at the offending location.
- [ ] `foundryctl forge` against
`docs/examples/docker/compose/casting.yaml` still produces the expected
pours.
#### Fixes
- Removes health check for docker compose, causes ingester to be
unhealthy
- Removes docker compose project to allow opamp to connect to signoz
- Pins volume names to casting metadata instead of docker project.
---------
Co-authored-by: Nagesh Bansal <nageshbansal59@gmail.com>
#### Features
- Disable simdjson engine to avoid issues with CPUs that do not support
AVX2
- Remove max memory server limits
- Reduce retention for system logs/tables
- Increase flush interval to help with data flushes
#### Features
- Add getDistinctID() using the machineid library to generate a stable,
non-reversible HMAC-SHA256 hash of the OS machine ID for Segment's
AnonymousId, enabling cross-session event correlation without collecting
PII.
Related: https://github.com/SigNoz/platform-pod/issues/1910
#### Fixes
- Add event parameter to Track() for explicit event naming (foundryctl:
<event>)
- Remove command from properties since it is now part of the event name
- Remove CommandProperties() and PropCommand constant
- Add nil map guard to WithSuccess and WithError
- Exclude gen command from ledger tracking
Related: https://github.com/SigNoz/platform-pod/issues/1910
#### Features
- Add standalone Docker image (docs/standalone/): single container
running all SigNoz components via systemd
casting
- Add SQLite metastore support in systemd casting (enricher, signoz
molding, forge, cast)
- Add Restart=on-failure with RestartSec=5 to migrator, ingester, and
signoz service templates to remove job readiness checks with
`After`/`Wants`/`Requires`
#### Fixes
- Enable all services before starting any (fixes Unit not found during
start)
- Use --no-block for systemctl start (prevents cast from blocking on
oneshot services)
#### Refactors
- Remove inter-service dependency coupling (After=/Requires=/Wants=)
from all service templates; services manage their own readiness via
restart policies and readiness checks
- Move config material paths from configs/<component>/ to
<component>/<kind>/
- Move IsEnabled() checks to forgeCasting dispatcher instead of
individual forge methods
- Simplify discoverAndPrepareServices and startAllService, remove
service categorization map
- Render environment variables (Spec.Env) and ClickHouse DSN in
ingester, migrator, and telemetrystore templates
Related: https://github.com/SigNoz/platform-pod/issues/1522
## Summary
- Fix `enabled: false` being silently ignored when it's the only field
set on a molding
- Change `MoldingSpec.Enabled` from `bool` to `*bool` to distinguish
"not set" (`nil`) from "explicitly disabled" (`&false`)
- Add casting config tests covering the `enabled` field merge behavior
Related: https://github.com/SigNoz/platform-pod/issues/1868