Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.4.0 #33

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Release v0.4.0 #33

merged 2 commits into from
Jan 27, 2025

Conversation

Umang01-hash
Copy link
Member

@Umang01-hash Umang01-hash commented Jan 27, 2025

Release v0.4.0

🚀 Features

Built-in Metrics for gRPC Services

GoFr now includes in-built metrics for all gRPC server executions and interservice gRPC calls. We automatically capture metrics to measure the response time of gRPC server/clients.

  • gRPC Server Registration

    • Use the gofr wrap grpc server -proto=<path/to/proto/file> to generate the GoFr's gRPC handlers.

    • Simplify the registration of a gRPC server using the Register{ServiceName}ServerWithGofr method:

      func main(){
       app := gofr.New()
       
       {packageName}.Register{ServiceName}ServerWithGofr(app, &packageName.{ServiceName}GoFrServer{})
       
       app.Run()
      }
  • gRPC Client Registration

    • Use the gofr wrap grpc client -proto=<path/to/proto/file> to generate the GoFr's gRPC client.

    • Easily create and register gRPC clients with the New{ServiceName}GoFrClient method:

      func main(){
       app:= gofr.New()
      
       gRPCClient, err := {clientPackage}.New{serviceName}GoFrClient(app.Config.Get("GRPC_SERVER_HOST", app.Metrics()))
       if err != nil {
          app.Logger().Errorf("Failed to create gRPC client: %v", err)
          return
       }
       
       app.Run()
      }
    • Use the registered client to make interservice gRPC calls.

Refer to the official documentation & examples to know more.


🛠️ Fixes & Improvements

  • Enhanced gRPC Logging
    • Improved logs for interservice gRPC calls, now including:
      • Trace ID: For better tracking of distributed requests.
      • Status Code: Logs the response status of gRPC calls for easy debugging and issue resolution.

@Umang01-hash Umang01-hash changed the title update version to v0.4.0 Release v0.4.0 Jan 27, 2025
@Umang01-hash Umang01-hash merged commit c32d026 into main Jan 27, 2025
4 checks passed
@aryanmehrotra aryanmehrotra deleted the release/0.4.0 branch February 6, 2025 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants