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

Set up New Relic for Staging and Production #334

Merged
merged 2 commits into from
Jul 23, 2024
Merged

Set up New Relic for Staging and Production #334

merged 2 commits into from
Jul 23, 2024

Conversation

spilth
Copy link
Collaborator

@spilth spilth commented Jul 23, 2024

Problem

We currently have very little insight into the performance of the Spatial Data Repository or the errors that users are encountering. Additionally it's difficult to search/watch logs on the servers due to their size and level of activity.

This is intended to help with #316

Solution

Add and configure New Relic so we can easily view requests, errors, logs and potential issues for our Staging and Production environments.

Note: The NEWRELIC_LICENSE_KEY key/value has already been set up in the staging and production environment configuration files on the servers.

Type

Chore

@spilth spilth requested review from ekate and mnyrop July 23, 2024 15:33
@@ -31,7 +31,9 @@
# http://capistranorb.com/documentation/getting-started/configuration/
# Feel free to add new variables to customise your setup.


set :default_env, {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since RAILS_ENV is to production in both staging and production, I'm using this to override what environment New Relic thinks it is. This will help keep staging and production data separate in New Relic.


common: &default_settings
# Required license key associated with your New Relic account.
license_key: <%= Settings.NEWRELIC_LICENSE_KEY %>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is set in the production.yml file on both staging and production.

@@ -1,6 +1,7 @@
SECRET_KEY_BASE: 6c51f19b57fdebd3dfd2a3cf8b69fab7f41a529b6bfbf8bff4a85815934066cbe22ddf7fa6083f227288c04e4eeb6c28f0fd90e31fc02314aaceb135dacecc07

DEVISE_SECRET_TOKEN: 2c847492b6d434c808e63a93ff16a7a897aa4c09943edaaf7aa498a29649048113cf55731282e39a82ae7ce3fb9f1087586d474fc483ad6f63806986a5a02a6c
NEWRELIC_LICENSE_KEY: none
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To avoid putting the license key in Git, I'm setting this to none and disabling monitoring in development.

@spilth spilth merged commit f7493e7 into main Jul 23, 2024
1 check passed
@spilth spilth deleted the 316-new-relic branch July 23, 2024 16:50
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