0.0
No release in over a year
Automatically report gruf failures as rollbar errors
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 0.14
>= 12.3
>= 3.8
>= 1.27
>= 0.16

Runtime

~> 2.5, >= 2.5.1
 Project Readme

gruf-rollbar - Rollbar reporting for gruf

Adds Rollbar error reporting support for gruf 2.7.0+ and rollbar

This gem will automatically report grpc failures and Gruf errors into Rollbar as they happen in servers and clients.

Installation

Simply install the gem:

gem 'gruf-rollbar'

Then after, in your gruf initializer:

Gruf.configure do |c|
  c.interceptors.use(Gruf::Rollbar::ServerInterceptor)
end

It comes with a few more options as well:

Option Description Default ENV Key
ignore_methods A list of method names to ignore from logging. E.g. ['namespace.health.check'] [] GRUF_ROLLBAR_IGNORE_METHODS
grpc_error_classes A list of gRPC error classes that will be used for detecting errors (as opposed to validation) GRPC::Unknown,GRPC::Internal,GRPC::DataLoss,GRPC::FailedPrecondition,GRPC::Unavailable,GRPC::DeadlineExceeded,GRPC::Cancelled GRUF_ROLLBAR_GRPC_ERROR_CLASSES
default_error_code The default gRPC error code to use (int value) GRPC::Core::StatusCodes::INTERNAL GRUF_ROLLBAR_DEFAULT_ERROR_CODE

Client Interceptors

To automatically report errors in your Gruf clients, pass the client interceptor to your Gruf::Client initializer:

Gruf::Client.new(
  service: MyService,
  client_options: {
    interceptors: [Gruf::Rollbar::ClientInterceptor.new]
  }
)

This gem is inspired by https://github.com/bigcommerce/gruf-sentry.