> For the complete documentation index, see [llms.txt](https://docs.prestd.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prestd.com/releases/v2.4.0.md).

# v2.4.0

Released: July 26, 2026

[GitHub tag](https://github.com/prest/prest/releases/tag/v2.4.0) · [Compare v2.3.0...v2.4.0](https://github.com/prest/prest/compare/v2.3.0...v2.4.0)

**v2.4.0** is an **observability and vector search** release. It adds opt-in OpenTelemetry instrumentation with a local SigNoz dev stack ([#1003](https://github.com/prest/prest/pull/1003)), pgvector nearest-neighbor ordering (`_korder`) and distance-threshold filtering (`:vecdist`) ([#1011](https://github.com/prest/prest/pull/1011)), and a routine pREST Studio dependency upgrade ([#1004](https://github.com/prest/prest/pull/1004)).

* **Docker:** `prest/prest:v2.4.0`
* **Go install:** `go install github.com/prest/prest/v2/cmd/prestd@v2.4.0`

{% hint style="info" %}
No breaking changes and no config migrations. Everything new in this release is **opt-in**: telemetry defaults to off, and `_korder` / `:vecdist` only apply where a client sends them against a `vector` column.
{% endhint %}

See [Changes since v2.3.0](#changes-since-v230) for the commit list.

***

## Highlights

### OpenTelemetry instrumentation + SigNoz dev stack ([#1003](https://github.com/prest/prest/pull/1003))

Opt-in OTLP/gRPC push telemetry: HTTP, Postgres, and MCP traces; `http.server.*` / `db.client.operation.duration` / `db.sql.connection.*` metrics; and a `slog` → OTel logs bridge that still writes to stdout. No new HTTP route is added — there is no `/metrics` scrape endpoint, so the attack surface is unchanged.

New `[otel]` config section (`PREST_OTEL_*` env overrides):

| Key                | Default   | Purpose                                                            |
| ------------------ | --------- | ------------------------------------------------------------------ |
| `enabled`          | `false`   | Master switch — zero overhead and no outbound connections when off |
| `service_name`     | `prestd`  | Resource `service.name`                                            |
| `endpoint`         | *(unset)* | OTLP gRPC collector `host:port`                                    |
| `protocol`         | `grpc`    | Only `grpc` for now                                                |
| `sample_ratio`     | `1.0`     | Trace head sampling, clamped `0.0–1.0`                             |
| `metrics_interval` | `15s`     | Metric export period                                               |
| `insecure`         | `false`   | Disable TLS to collector (local/dev)                               |
| `db_statement`     | `false`   | Record SQL text on DB spans (trusted envs only)                    |

Setup fails closed: if the exporter can't be built at startup, pREST logs a warning and keeps serving with telemetry disabled. Graceful shutdown (`SIGINT`/`SIGTERM` draining via `signal.NotifyContext`) ships alongside it so telemetry flushes on exit. A self-contained SigNoz stack lives under `dev/signoz/` (`make signoz-up` / `make signoz-down`) for local viewing. See [Configuring pREST — Observability](/get-started/configuring-prest.md#observability-opentelemetry-v240).

### pgvector KNN ordering and distance filtering ([#1011](https://github.com/prest/prest/pull/1011))

Two new query-parameter forms for `vector`-typed columns (requires the `pgvector` extension), both restricted to a fixed metric whitelist (`l2`/`euclidean`, `cosine`/`cos`, `ip`/`inner`/`dot`, `l1`/`manhattan`) and validated end-to-end:

| Parameter          | Form                                         | Example                               | Effect                                                                                          |
| ------------------ | -------------------------------------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `_korder`          | `<column>:<metric>:<vector>`                 | `_korder=embedding:l2:[1,0,0]`        | Orders by nearest-neighbor distance (KNN); composes with `_order` as an additional sort term    |
| `<column>:vecdist` | `<metric>:<comparison>:<vector>:<threshold>` | `embedding:vecdist=l2:lt:[1,0,0]:0.5` | Filters rows by distance threshold; comparison is restricted to `=`, `!=`, `<`, `<=`, `>`, `>=` |

Malformed metrics, non-numeric vector elements, oversized vectors (>16000 dims, pgvector's own limit), non-scalar comparisons (e.g. `like`), and dimension mismatches all return `400` rather than reaching the database unsafely. See [Parameters — pgvector KNN ordering and distance filtering](/api-reference/parameters.md#pgvector-knn-ordering-and-distance-filtering-v240).

### pREST Studio dependency upgrade ([#1004](https://github.com/prest/prest/pull/1004))

Routine dependency bump for the embedded Studio UI. Fixes the auth dialog not reflecting saved credentials / "remember me" state on reopen, and avoids building incomplete MCP tool-call requests when argument construction fails. No config or API changes.

***

## Changes since v2.3.0

| PR                                                | Summary                                                                                                             |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [#1003](https://github.com/prest/prest/pull/1003) | Opt-in OpenTelemetry (push) instrumentation — traces, metrics, slog→OTel log bridge — plus a local SigNoz dev stack |
| [#1004](https://github.com/prest/prest/pull/1004) | pREST Studio dependency upgrade; auth-dialog and tool-invocation fixes                                              |
| [#1011](https://github.com/prest/prest/pull/1011) | pgvector nearest-neighbor ordering (`_korder`) and distance-threshold filtering (`:vecdist`)                        |

Full detail: [compare v2.3.0...v2.4.0](https://github.com/prest/prest/compare/v2.3.0...v2.4.0).

***

## Upgrading from v2.3.0

No configuration changes are required; this is a drop-in update.

1. Deploy `prest/prest:v2.4.0`, the matching binary, or `go install …@v2.4.0`.
2. **Telemetry stays off by default.** Set `otel.enabled = true` (or `PREST_OTEL_ENABLED=true`) and `otel.endpoint` only when you have an OTLP/gRPC collector to send to — see [Configuring pREST — Observability](/get-started/configuring-prest.md#observability-opentelemetry-v240).
3. **pgvector columns** gain `_korder` and `:vecdist` automatically; both require the `pgvector` extension on the target column and are no-ops otherwise.
4. MCP at `/_mcp`, Studio at `/_studio/`, and the multi-adapter registry are unchanged from v2.3.0.

***

## Related

* [Configuring pREST — Observability](/get-started/configuring-prest.md#observability-opentelemetry-v240)
* [Parameters — pgvector KNN ordering and distance filtering](/api-reference/parameters.md#pgvector-knn-ordering-and-distance-filtering-v240)
* [pREST Studio](/get-started/prest-studio.md)
* [v2.3.0 release notes](/releases/v2.3.0.md)
* [Acronyms](/readme/acronyms.md) · [MCP](/readme/acronyms.md#mcp) · [REST](/readme/acronyms.md#rest)
