Skip to content

Commit

Permalink
Add pension specific sentry tag (#16040)
Browse files Browse the repository at this point in the history
* - Add pension specific sentry tag

* - Add pension specific sentry tag

* - Add pension specific sentry tag

* - Add pension specific sentry tag

---------

Co-authored-by: Scott Gorman <[email protected]>
  • Loading branch information
scottsdevelopment and Scott Gorman authored Mar 26, 2024
1 parent 0ec7386 commit 09e2a36
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/v0/pension_claims_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'pension_21p527ez/tag_sentry'

module V0
class PensionClaimsController < ClaimsBaseController
service_tag 'pension-application'
Expand Down Expand Up @@ -45,7 +47,7 @@ def show
# Creates and validates an instance of the class, removing any copies of
# the form that had been previously saved by the user.
def create
PensionBurial::TagSentry.tag_sentry
Pension21p527ez::TagSentry.tag_sentry

claim = claim_class.new(form: filtered_params[:form])
user_uuid = current_user&.uuid
Expand Down
3 changes: 3 additions & 0 deletions app/sidekiq/lighthouse/pension_benefit_intake_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'benefits_intake_service/service'
require 'central_mail/datestamp_pdf'
require 'simple_forms_api_submission/metadata_validator'
require 'pension_21p527ez/tag_sentry'

module Lighthouse
class PensionBenefitIntakeJob
Expand Down Expand Up @@ -33,6 +34,8 @@ class PensionBenefitIntakeError < StandardError; end
# @param [Integer] saved_claim_id
# rubocop:disable Metrics/MethodLength
def perform(saved_claim_id)
Pension21p527ez::TagSentry.tag_sentry

@saved_claim_id = saved_claim_id
@claim = SavedClaim::Pension.find(saved_claim_id)
raise PensionBenefitIntakeError, "Unable to find SavedClaim::Pension #{saved_claim_id}" unless @claim
Expand Down
13 changes: 13 additions & 0 deletions lib/pension_21p527ez/tag_sentry.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

module Pension21p527ez
module TagSentry
module_function

TAG_NAME = 'pension_21p527ez'

def tag_sentry
Sentry.set_tags(feature: TAG_NAME)
end
end
end

0 comments on commit 09e2a36

Please sign in to comment.