Module: AtlasEngine::Services::ServiceHelper

Included in:
Validation
Defined in:
app/models/atlas_engine/services/service_helper.rb

Instance Method Summary collapse

Instance Method Details

#handle_metrics(request_type, country_code, using_session_token) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/models/atlas_engine/services/service_helper.rb', line 7

def handle_metrics(request_type, country_code, using_session_token)
  result = yield

  ActiveSupport::Notifications.instrument("atlas.service.events", {
    request_type: request_type,
    country_code: country_code,
    using_session_token: using_session_token,
    result: result,
  })

  result
end