diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9a6bf6414f3..22122a59ae8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2115,8 +2115,8 @@ lib/va_profile/profile/v3/health_benefit_bio_response.rb @department-of-veterans lib/va_profile/profile/v3/service.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/vfs-mhv-integration @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/controllers/v0/profile/contacts_controller_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/vfs-mhv-integration @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/lib/va_profile/profile/v3/service_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/vfs-mhv-integration @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group -lib/logging/third_party_transaction.rb @department-of-veterans-affairs/backend-review-group -spec/lib/logging/third_party_transaction_spec.rb @department-of-veterans-affairs/backend-review-group +lib/logging @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers +spec/lib/logging @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers spec/lib/zero_silent_failures @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group Brewfile @department-of-veterans-affairs/backend-review-group docker-compose-deps.yml @department-of-veterans-affairs/backend-review-group diff --git a/spec/lib/logging/sidekiq_spec.rb b/spec/lib/logging/sidekiq_spec.rb index 0bac1c22d32..4d8ba550a96 100644 --- a/spec/lib/logging/sidekiq_spec.rb +++ b/spec/lib/logging/sidekiq_spec.rb @@ -9,7 +9,7 @@ let(:service) { 'test-application' } let(:monitor) { described_class.new(service) } let(:call_location) { double('Location', base_label: 'method_name', path: '/path/to/file.rb', lineno: 42) } - let(:metric) { 'api.monitor.sidekiq.attempt' } + let(:metric) { 'api.monitor.sidekiq' } let(:user_account_uuid) { '123-test-uuid' } let(:benefits_intake_uuid) { '123-test-uuid' } let(:additional_context) { { file: 'foobar.pdf', attachments: ['file.txt', 'file2.txt'] } } @@ -53,9 +53,9 @@ context 'with a call location provided' do describe '#track_claim_submission' do it 'logs a request with call location' do - payload[:statsd] = 'api.monitor.sidekiq.attempt' + payload[:statsd] = 'api.monitor.sidekiq' - expect(StatsD).to receive(:increment).with('api.monitor.sidekiq.attempt') + expect(StatsD).to receive(:increment).with('api.monitor.sidekiq') expect(Rails.logger).to receive(:info).with('Lighthouse::Job submission to LH attempted', payload) monitor.track_claim_submission('Lighthouse::Job submission to LH attempted', metric, claim, @@ -65,25 +65,26 @@ describe '#track_claim_submission_warn' do it 'logs a request with call location' do - payload[:statsd] = 'api.monitor.sidekiq.attempt' + payload[:statsd] = 'api.monitor.sidekiq' - expect(StatsD).to receive(:increment).with('api.monitor.sidekiq.attempt') - expect(Rails.logger).to receive(:warn).with('Lighthouse::Job submission to LH attempted', payload) + expect(StatsD).to receive(:increment).with('api.monitor.sidekiq') + expect(Rails.logger).to receive(:warn).with('Lighthouse::Job submission to LH failure', payload) - monitor.track_claim_submission_warn('Lighthouse::Job submission to LH attempted', metric, claim, + monitor.track_claim_submission_warn('Lighthouse::Job submission to LH failure', metric, claim, benefits_intake_uuid, user_account_uuid, additional_context, call_location:) end end describe '#track_claim_submission_error' do it 'logs a request with call location' do - payload[:statsd] = 'api.monitor.sidekiq.attempt' + payload[:statsd] = 'api.monitor.sidekiq' - expect(StatsD).to receive(:increment).with('api.monitor.sidekiq.attempt') - expect(Rails.logger).to receive(:error).with('Lighthouse::Job submission to LH attempted', payload) + expect(StatsD).to receive(:increment).with('api.monitor.sidekiq') + expect(Rails.logger).to receive(:error).with('Lighthouse::Job submission to LH exhausted!', payload) - monitor.track_claim_submission_error('Lighthouse::Job submission to LH attempted', metric, claim, - benefits_intake_uuid, user_account_uuid, additional_context, call_location:) + monitor.track_claim_submission_error('Lighthouse::Job submission to LH exhausted!', metric, claim, + benefits_intake_uuid, user_account_uuid, + additional_context, call_location:) end end end