Skip to content
What's new

Rent v0.8.4

Rent v0.8.4 makes detailed database instrumentation opt-in. Ordinary SDK builds exclude detailed Rent spans and disable SQLx statement logging on Rent-created connections. Application logging and ordinary Rent warnings and errors remain available.

Choose an instrumented build

Add instrumentation to the existing Cargo features for your Rent dependency when you want detailed query, transaction, connection and migration observation:

features = ["postgres", "instrumentation"]

The feature is off by default in both debug and release builds. Enabling it does not install a subscriber, collector or exporter. Your application chooses those and controls runtime filtering. Environment filters cannot enable spans that were excluded from the build.

Cargo combines features across dependencies. An instrumentation request elsewhere in the same build enables it for the shared driver. Inspect the actual build with cargo tree -e features -i rent-driver or check rent::driver::INSTRUMENTATION_ENABLED. Keep diagnostic builds separate from ordinary application builds.

Pools created by the application and wrapped in DatabasePool retain their SQLx logging settings. The feature controls detailed Rent spans and statement logging on connections Rent creates. Disabling statement logging does not remove internal SQLx timing and bookkeeping.

Upgrade

Use v0.8.4 for the CLI and every Rent crate, regenerate configured clients and commit the application's lockfile. Existing schemas, permission rules and database storage remain unchanged. Review migration diffs for other application changes. The delegated helper condition introduced in v0.8.3 remains available.

If a diagnostic test counts SQLx query events, enable instrumentation explicitly for that test build. A zero event count in a normal build does not mean that no SQL executed. Retain query-budget assertions in instrumented diagnostic builds and verify application behavior in ordinary builds too. Logging uses no query interceptor.

See runtime and observability and the complete runtime example for configuration and event counting guidance.