Class: ElasticAPM::GRPC::ServerInterceptor Private

Inherits:
GRPC::ClientInterceptor
  • Object
show all
Defined in:
lib/elastic_apm/grpc.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'request'

Instance Method Summary collapse

Instance Method Details

#request_response(request:, call:, method:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

rubocop:disable Lint/UnusedMethodArgument



66
67
68
69
70
71
72
73
74
75
76
# File 'lib/elastic_apm/grpc.rb', line 66

def request_response(request:, call:, method:)
  transaction = start_transaction(call)
  yield
  transaction.done 'success'
rescue ::Exception => e
  ElasticAPM.report(e, handled: false)
  transaction&.done 'error'
  raise
ensure
  ElasticAPM.end_transaction
end