Skip to content

Commit

Permalink
fix: Remove dependence on activesupport (#687)
Browse files Browse the repository at this point in the history
Instrumentations must not use transitive dependencies used by the library.

In this case, relying on the gruf library to load specific ActiveSupport extensions leaves the instrumentation vulnerable to bugs.

For this reason I have changed the code to use Enumerable methods instead of ActiveSupport extensions.

See #686
  • Loading branch information
arielvalentin authored Oct 10, 2023
1 parent d3690bc commit aaac9bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Gruf
module Interceptors
class Client < ::Gruf::Interceptors::ClientInterceptor
def call(request_context:)
return yield if instrumentation_config.blank?
return yield if instrumentation_config.empty?

service = request_context.method.split('/')[1]
method = request_context.method_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Gruf
module Interceptors
class Server < ::Gruf::Interceptors::ServerInterceptor
def call
return yield if instrumentation_config.blank?
return yield if instrumentation_config.empty?

method = request.method_name

Expand Down

0 comments on commit aaac9bb

Please sign in to comment.