This release upgrades TriFrost's observability layer with faster scramblers, enhanced infrastructure secret detection, and smarter host resolution while continuing to refine the core developer experience.
Added
- feat: Added
OMIT_PRESETS.infra
to automatically redact infrastructure secrets like GitHub tokens, Stripe keys, AWS/GCP credentials, and JWT-style tokens. The infra preset is also included in the defaults used by the log scrambler. Scrambling (introduced in 0.28.0) helps redact sensitive fields from logs, see redaction & scrambling docs for details. - feat: Added
ctx.domain
getter, which extracts the domain from the resolved host (e.g.sub.example.com
->example.com
). - feat: Host configuration now uses
TRIFROST_HOST
, falling back toSERVICE_HOST
andHOST
environment variables. Treating them as canonical in non-trusted environments.
Improved
- perf: ~10% faster
isValidTraceId
via optimized ASCII range checks in Logger module - perf: Improved
createScrambler()
, with smarter pattern matching and lazy cloning, performance across all presets improved by 20–50%, even with expanded infra redaction. - qol: Observability traces now include
http.host
for better visibility and trace correlation. - security: Host detection from headers (
x-forwarded-host
,forwarded
) now only occurs whentrustProxy: true
is explicitly enabled (default in trusted environments like Cloudflare Workers). Otherwise, it falls back to environment-based resolution or0.0.0.0
. - misc: Adjusted build system to dual-build ESM + CJS output.
Breaking
- Removed
host
as an option onApp
. Host is now determined entirely from environment variables or request headers (see Added and Improved).
Faster scramblers, smarter defaults, and no secrets left behind.
New Scrambling Benchmark:
Old Scrambling Benchmark:
Stay fast. Stay minimal. Stay frosty ❄️.