Skip to main content

Enabling the SDK

Varianz is opt-in: the SDK is disabled by default. A service that carries the SDK but is given no configuration stays dormant — VPoints pass through, nothing registers, no native library is touched, and every SDK call succeeds as a no-op. Resolution order (first match wins):
  1. VARIANZ_ENABLED environment variable — wins unconditionally when set.
  2. enabled key in a config fileVARIANZ_CONFIG=<path> if set, else ./varianz.toml, else ~/.varianz/sdk.toml. First existing file wins; files are not merged.
  3. Built-in default: disabled.
Accepted boolean tokens (case-insensitive): true = true, 1, on, yes, enabled; false = false, 0, off, no, disabled. An unparseable value or unreadable config resolves to disabled with a single warning — the same fail-open posture as the rest of Varianz: when anything is wrong, VPoints simply run your original code. The config file schema is a single top-level key; unknown keys are ignored:
The state is resolved once at SDK initialization and cached for the process lifetime — there is no hot reload. The SDK logs exactly one startup line stating its state and source, e.g.:
The toggle behaves identically in every SDK. For Java/Kotlin, interception additionally requires the varianz-agent to be attached (Gradle weave, Maven -Dvarianz.skipAgent=true) — see Java SDK.

Registry endpoint

The endpoint is normally passed in code (Varianz("http://..."), initRegistry({ endpoint }), varianz.WithEndpoint(...), RegistryBinding.init(...)). Environment overrides where supported:

TLS

SDK clients always verify TLS against the platform trust store by default. There is no code-side override for plaintext — only the environment: Every SDK client (Python, TypeScript, Go, JVM) reads these identically. Rotating a CA file on disk doesn’t affect established connections — reconnect or restart the client.

Environment tags

Stages can be scoped to deployment environments. Clients advertise theirs via SDK options (for example initRegistry({ region, cluster, tags })) or environment variables:

Git provenance

VPoints record their code location (file, line, git commit) for tooling. Detection reads the local .git; production artifacts usually run without one, so set these in your build/deploy pipeline: Values merge field-by-field on top of whatever was auto-detected.

Build-time switches

JVM equivalent for the processor: -Avarianz.proc.enabled=false.

The standard local-dev environment

For the common case — local plaintext registry on 50051 — every service and test process needs: