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

Add logstash and lograge to the Rails app #691

Merged
merged 4 commits into from
Jan 30, 2025
Merged

Add logstash and lograge to the Rails app #691

merged 4 commits into from
Jan 30, 2025

Conversation

briri
Copy link
Collaborator

@briri briri commented Jan 29, 2025

Fixes #682

Lograge allow us to log to a file in the logstash format AND retain the existing Rails logs. This will be helpful in the event that we need to do a deep dive into them to investigate an issue.

  • Added logstash-event gem
  • Added lograge gem
  • Added lograge confirguration
  • Added some additional password and client_secret fields to the Rails log config so that they get filtered by default

Deployed and running in stage. The new logs can be reviewed in the /dmp/apps/dmptool/shared/log/lograge_stage.log file

@briri briri requested a review from jupiter007 January 29, 2025 23:08
@@ -4,5 +4,6 @@
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [
:password, :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
:password, :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp,
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice

@@ -0,0 +1,34 @@
Rails.application.configure do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for adding all the comments :)

Copy link
Collaborator

@jupiter007 jupiter007 left a comment

Choose a reason for hiding this comment

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

LGTM. I checked out the log on stage. Looks good.

@briri briri merged commit bb05c2c into v5 Jan 30, 2025
3 of 9 checks passed
@briri briri deleted the feature/BR-lograge branch January 30, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants