Skip to content

Add a rake task for reporting deployments to NewRelic#4823

Merged
jmhooper merged 2 commits intomainfrom
jmhooper-newrelic-deployment-task
Mar 23, 2021
Merged

Add a rake task for reporting deployments to NewRelic#4823
jmhooper merged 2 commits intomainfrom
jmhooper-newrelic-deployment-task

Conversation

@jmhooper
Copy link
Contributor

Why: Our NewRelic config expects several tools to be part of the runtime in order to work. This means that bundle exec newrelic deployment breaks because it does not load the rails environment and thusly does not load AppConfig or Identity::Hostdata.

This change is the third of these solutions I investigated:

  1. Add an ERB block to the NR config to setup AppConfig and load Hostdata
  2. Completely rebuild the NR config to use env vars instead of our app's tooling (eventually we should pursue this as it is a better long-term solution)
  3. Wrapping the deployment call in a rake task that loads the rails environment

**Why**: Our NewRelic config expects several tools to be part of the runtime in order to work.
This means that `bundle exec newrelic deployment` breaks because it does not load the rails environment and thusly does not load AppConfig or Identity::Hostdata.

This change is the third of these solutions I investigated:

1. Add an ERB block to the NR config to setup AppConfig and load Hostdata
2. Completely rebuild the NR config to use env vars instead of our app's tooling (eventually we should pursue this as it is a better long-term solution)
3. Wrapping the deployment call in a rake task that loads the rails environment
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

@jmhooper jmhooper merged commit 356b655 into main Mar 23, 2021
@jmhooper jmhooper deleted the jmhooper-newrelic-deployment-task branch March 23, 2021 17:07
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