github gofr-dev/gofr v1.60.1

latest release: pkg/gofr/metrics/exporters/gcp/v0.2.0
5 hours ago

Release v1.60.1

🛠️ Fixes

  • GCP Metrics Rejected Server-Side, Silently — Google requires location and instance on prometheus_target and drops any point missing either. Nothing in the tree supplied a source for instance, so every point was discarded in every deployment — invisibly, since the push authenticates and succeeds and nothing reaches otel.SetErrorHandler. resource.WithHostID() now supplies host.id, and a startup warning fires when no location resolves. Adds RegisterResourceDetector and Config.Resource, both Experimental, so a vendor submodule can supply what core cannot without core depending on a cloud SDK; nothing was removed, so the upgrade is drop-in. OTEL_RESOURCE_ATTRIBUTES is now documented, and is required for the gcp exporter outside Google Cloud.

  • Baggage Members Dropped After the First — The tracing middleware's headerCarrier did not implement propagation.ValuesGetter, so Baggage.Extract fell back to the single-value Get and discarded every member after the first. Affects any request carrying more than one Baggage header, which proxies and service meshes commonly emit.

  • AddStaticFiles Discarded os.Getwd() — On failure the static path silently resolved against the filesystem root, with no log to explain why the endpoint had not registered. The error is now logged and registration returns early, matching the os.Stat path beside it.

⚡ Performance — Tracing Middleware

Span name, attributes and option wrappers are now built once per (method, route) rather than rebuilt on every request:

provider before after
non-recording 21 allocs, 2074 B 11 allocs, 1568 B
recording 23 allocs, 2875 B 17 allocs, 2658 B

Keyed on the route template, never the concrete path, and bounded at 4096 entries across the nine defined HTTP methods. No behavior change.

📦 CI & Dependencies

  • golang base image 1.26 → 1.27 across all 9 Dockerfiles. Closes #4116.
  • crate-ci/typos 1.49.0 → 1.50.0, SHA-pinned. Closes #4114.

Full Changelog: v1.60.0...v1.60.1

Don't miss a new gofr release

NewReleases is sending notifications on new releases.