department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
282 stars 199 forks source link

Datadog: add tags to 10-10d monitors to identify paths #85849

Closed marywang2 closed 2 months ago

marywang2 commented 3 months ago

Add tags to forms so we can track which applicant type is filling out each form (for 10-10d).

This ticket should split out the signer type ("I’m applying for benefits for myself", "I’m a Veteran applying for benefits for my spouse or dependents", "I’m a representative applying for benefits on behalf of someone else")

Implementation Plan

  1. Add some form of this code to models. We will have to change preparer_type to something in our JSON
    STATS_KEY = 'api.ivc_champva_form.10_10d'
    . . .
    def track_user_identity
    identity = data['preparer_type']
    StatsD.increment("#{STATS_KEY}.#{identity}")
    Rails.logger.info('IVC ChampVA Forms - 10-10D Submission User Identity', identity:)
    end
  2. Call it in the uploads_controller like form.track_user_identity
  3. Insert into DD dashboard to mimic SimpleForms API but update query to use our info per model (Note: I added a broken one as a template that needs changing)

Ref:

marywang2 commented 3 months ago

fyi @baltes

balexandr commented 3 months ago

Added implementation plan

balexandr commented 3 months ago

@baltes @marywang2 @michaelclement found this in vets-website repo. Is this what we want the "User Identity" to be tracked as?

image.png
marywang2 commented 3 months ago

I can't seem to open that image @balexandr :(

balexandr commented 2 months ago

@marywang2 Thats odd. Although @baltes confirmed this is what we wanted to use for 10-10D as the user identity.

balexandr commented 2 months ago
Screenshot 2024-07-01 at 11.27.21 AM.png

@marywang2 @baltes