Coder Social home page Coder Social logo

sentry-gruf's Introduction

Sentry-Gruf · Supported by Cado Labs · Gem Version · Coverage Status

Gruf both client and server interceptors, which report bugs to the Sentry.

Installation

gem "sentry-gruf"
bundle install
# --- or ---
gem install sentry-gruf
require "sentry-gruf"

Usage

After you install the gem, you need to set up the Sentry. You can read about Sentry configuration here.

Gem provides two interceptors for both client and server sides. All you need to add this interceptor at the beginning of interceptors stack.

For the server side, the installation will look something like this:

Gruf.configure do |config|
  config.interceptors.clear # Like config.use_default_interceptors = false
  config.interceptors.use(
    Sentry::Gruf::ServerInterceptor,
    sensitive_grpc_codes: [2, 5],
  )
  # Other interceptors go below.
end

where sensitive_grpc_codes is an optional array with codes of GRPC errors which will be reported to the Sentry.

And for the client side:

client = ::Gruf::Client.new(
  service: Some::Service,
  client_options: {
    interceptors: [Sentry::Gruf::ClientInterceptor.new, OtherInterceptors.new]
  }
)

Please note that the interceptor for the client itself does not send errors to Sentry. It simply tags some information about the last request made through the client.

Contributing

  • Fork it ( https://github.com/Cado-Labs/sentry-gruf )
  • Create your feature branch (git checkout -b feature/my-new-feature)
  • Commit your changes (git commit -am '[feature_context] Add some feature')
  • Push to the branch (git push origin feature/my-new-feature)
  • Create new Pull Request

License

Released under MIT License.

Supporting

Supported by Cado Labs

Authors

Created by Ivan Chernov.

sentry-gruf's People

Contributors

anotherregulardude avatar nile1985 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.