Configure the instance ID
The ADS instance ID uniquely identifies each running ADS instance. It appears in metrics, distributed traces, and log output, making it possible to correlate data across observability tools when multiple instances are running in a cluster or behind a load balancer.
Default ID format
By default, ADS generates an instance ID automatically at startup using the format:
default-<xxxxxxxx>
Where <xxxxxxxx> is a randomly generated 8-digit hexadecimal string. This random part is regenerated on every restart, so each ADS instance always has a unique ID, but the ID is not stable across restarts.
Set a custom instance ID
Add the identity section to deployment.yaml to override the default behavior.
- Constant identity
- Prefix identity
Constant identity
A constant identity sets a fixed, stable ID that does not change across restarts. Use this when you need to correlate metrics or logs for a specific, named instance over time.
identity:
constant: <constant-value>
Example:
identity:
constant: ads-production-eu-west
Prefix identity
A prefix identity prepends a custom string to the randomly generated part. The random section is regenerated on each restart, so the ID changes across restarts, but the prefix makes it easy to identify which environment, region, or deployment the instance belongs to.
identity:
prefix: <your-custom-prefix>
The resulting ID takes the form:
your-custom-prefix-<xxxxxxxx>
Example:
identity:
prefix: ads-staging
Produces IDs such as ads-staging-3f7a1b2c.
The constant and prefix values may contain alphanumeric characters, hyphens (-), and underscores (_). The maximum length is 100 characters.
Why the instance ID matters
| Use case | How the instance ID helps |
|---|---|
| Metrics | Identifies which ADS instance produced a specific metric data point when multiple instances report to the same backend (e.g. InfluxDB, Prometheus). |
| Distributed tracing | Tags trace spans with the originating instance, making it possible to follow a request across a cluster. |
| Log correlation | Filters log output to a single instance when diagnosing issues in a multi-instance deployment. |
| Cache clusters | Distinguishes nodes within a distributed cache cluster. |
For a stable, human-readable ID in production, use a constant identity. For dynamic environments where instances scale up and down, use a prefix identity to retain environment context while keeping each instance uniquely identifiable.