Class: VAProfile::Service

Inherits:
Common::Client::Base show all
Defined in:
lib/va_profile/service.rb

Constant Summary collapse

STATSD_KEY_PREFIX =
VAProfile::Stats::STATSD_KEY_PREFIX

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Common::Client::Base

configuration

Methods included from SentryLogging

#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger

Constructor Details

#initialize(user) ⇒ Service

Returns a new instance of Service.



15
16
17
# File 'lib/va_profile/service.rb', line 15

def initialize(user)
  @user = user
end

Class Method Details

.breakers_serviceObject



27
28
29
# File 'lib/va_profile/service.rb', line 27

def self.breakers_service
  Common::Client::Base.breakers_service
end

Instance Method Details

#perform(method, path, body = nil, headers = {}) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/va_profile/service.rb', line 19

def perform(method, path, body = nil, headers = {})
  log_dates(body)

  VAProfile::Stats.increment('total_operations')
  config.base_request_headers.merge(headers)
  super(method, path, body, headers)
end