Skip to content

v1.59.0

Latest

Choose a tag to compare

@aryanmehrotra aryanmehrotra released this 13 Aug 05:33
· 4 commits to main since this release
da1d986

Release v1.59.0

πŸš€ Features

πŸ”Ή Push-based OTLP Metrics Export

Metrics can now be pushed over OTLP alongside the existing Prometheus pull endpoint, for
serverless and ephemeral deployments β€” Cloud Run scale-to-zero, short-lived jobs β€” where a
scrape interval simply misses the process. An OTel MeterProvider supports several readers on
the same instruments, so the Prometheus reader and the OTLP push reader run together with no
double-counting.

The two concerns are independent switches, and the default is unchanged: with no new config
set, metrics stay Prometheus pull-only, byte for byte as before.

Concern Control Default
Prometheus pull /metrics METRICS_PORT (0 disables) on (2121)
OTLP push METRICS_EXPORTER=otlp off
METRICS_EXPORTER=otlp
OTEL_EXPORTER_OTLP_ENDPOINT=https://collector:4318

Resolves discussion #3366. β€” #3761

πŸ› Fixes

πŸ”Ή S3 file store: io.Copy no longer hangs and OOM-kills the process

Read returned len(p) with a nil error regardless of how many bytes were actually read, so
io.Copy(w, s3file) never saw EOF and reallocated a growing buffer on every iteration. That path
is now correct and linear. Also in the same fix: Create works on a fresh prefix, and object
metadata is treated as optional. Fixes #3804. β€” #3805

πŸ”Ή Static endpoints serve their index page instead of 403 or an endless redirect

A request for the root of a static endpoint never served that directory's index β€” two separate
regressions, from #2759 and a later change, surfacing as a 403 or a redirect loop.
examples/using-html-template answers GET / correctly again. Fixes #3819. β€” #3820

πŸ”Ή Data race on server shutdown, plus de-flaked cron and file-token unit tests. β€” #3800

πŸ” Security

πŸ”Ή /.well-known/health no longer leaks backend inventory to unauthenticated callers

The health endpoint is served unauthenticated, but returned the full Container.Health() map:
datastore hosts and ports, database / keyspace / bucket names, connection-pool statistics, the
Elasticsearch username, and raw error strings. Anyone able to reach the app port could enumerate
the backend inventory with no credentials.

The public endpoint is now redacted to {name, status}. Container.Health() keeps the full map
for in-process operational use, and no exported API changed. Fixes #3802. β€” #3807

πŸ”Ή grpc bumped to v1.83.0 in examples/using-s3-filestore, resolving
GHSA-hrxh-6v49-42gf. β€” #3920

⚑ Performance

πŸ”Ή Fewer allocations on the request hot path

Four focused changes across logging and HTTP response, each guarded by a benchmark and an
equivalence test. No public-API, wire-shape, or environment-variable change.

benchmark time B/op allocs/op
ResponderRespond 380 β†’ 334 ns (βˆ’12%) 249 β†’ 72 (βˆ’71%) 4 β†’ 2
getIPAddress 59 β†’ 26 ns (βˆ’56%) 48 β†’ 0 (βˆ’100%) 1 β†’ 0
ContextLogger.Info 584 β†’ 461 ns (βˆ’21%) 568 β†’ 216 (βˆ’62%) 9 β†’ 6
Logger.Info (JSON) 513 β†’ 393 ns (βˆ’23%) β€” β€”

Roughly βˆ’577 B and βˆ’6 allocations on a typical request. β€” #3758

Full changelog: v1.58.0...v1.59.0