Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace Rails logging with StatsD metrics for diagnostic codes #20272

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

asiisii
Copy link
Contributor

@asiisii asiisii commented Jan 14, 2025

Summary

  • This work is behind a feature toggle (flipper): NO
  • Replaced Rails.logger.info calls in log_hyphenated_diagnostic_codes with StatsD.increment to avoid logging sensitive diagnostic codes. The new metrics include diagnostic code, diagnostic code type, and hyphenated diagnostic code as tags.
  • This change improves privacy by preventing potential de-anonymization of veterans based on logged diagnostic codes.

Related issue(s)

Testing done

  • New code is covered by unit tests.
  • Previously, diagnostic codes were logged using Rails.logger.info.
  • Verified that StatsD.increment is now used to record metrics, and updated tests to ensure that the correct metrics and tags are being sent.

What areas of the site does it impact?

  • This change impacts the log_hyphenated_diagnostic_codes method in the MaxRatingAnnotator class, which handles processing diagnostic codes for rated disabilities.

Acceptance criteria

  • I updated unit tests to verify the new StatsD.increment calls.
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution (StatsD).
  • Documentation has been updated (link to documentation, if any).
  • No sensitive information (i.e., PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs.

Copy link
Contributor

@dfitchett dfitchett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

Copy link
Contributor

@nanotone nanotone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@asiisii asiisii merged commit 13be710 into master Jan 15, 2025
47 of 49 checks passed
@asiisii asiisii deleted the ee/am/3941 branch January 15, 2025 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants