github gofr-dev/gofr v1.50.2

9 hours ago

Release v1.50.2

🚀 Enhancements

🔹 HTTP Connection Pool Configuration

GoFr now supports configurable HTTP connection pool settings to optimize performance for high-frequency HTTP requests in microservices.

New ConnectionPoolConfig option for AddHTTPService() method

Configurable settings:

  • MaxIdleConns: Maximum idle connections across all hosts (default: 100)
  • MaxIdleConnsPerHost: Maximum idle connections per host (default: 2, recommended: 10-20)
  • IdleConnTimeout: Connection keep-alive duration (default: 90 seconds)
  • Addresses the limitation where Go's default MaxIdleConnsPerHost: 2 is insufficient for microservices
  • Important: ConnectionPoolConfig must be applied first when using multiple options

🔹 OpenTSDB Metrics Support

Added metrics instrumentation for OpenTSDB operations to provide better observability.

New metrics:

  • app_opentsdb_operation_duration: Duration of OpenTSDB operations in milliseconds
  • app_opentsdb_operation_total: Total OpenTSDB operations
  • Enables monitoring and alerting on OpenTSDB data operations

🛠️ Fixes

🔹 Panic Recovery for OnStart Hooks
Added panic recovery mechanism for OnStart hooks to prevent entire application crash. If a hook panics, the error is logged and the application continues with other hooks, improving application stability and resilience.

🔹 GCS Provider Name for Observability
Added provider name "GCS" to Google Cloud Storage file store for improved logging and metrics identification. Previously it used common logging semantics "COMMON" shared across file storage providers leading to improper visibilty of the underlying file storage being used,

🔹 Zipkin Trace Exporter Error Handling
Fixed error logging for successful trace exports (2xx status codes). Zipkin exporter now correctly ignores 201 status codes and other 2xx responses, reducing noise in error logs for successful operations.

Don't miss a new gofr release

NewReleases is sending notifications on new releases.