Skip to content

Setup New Relic dashboards and alerts with terraform #1109

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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

JulianPasquale
Copy link
Contributor

@JulianPasquale JulianPasquale commented Jul 2, 2025

This PR adds:

  • New Relic setup via Terraform
  • Dashboard for monitoring:
    • Transactions
    • Errors
    • Key metrics
  • Alerts for:
    • Application errors
    • P90 and P95 latency thresholds
    • Notifications via Slack and/or email
    • Latency configurable per-transaction

@PerezIgnacio PerezIgnacio marked this pull request as ready for review July 25, 2025 14:11
@JulianPasquale JulianPasquale requested a review from a team July 25, 2025 14:44
@@ -0,0 +1,3 @@
NEW_RELIC_ACCOUNT_ID=1234
NEW_RELIC_API_KEY=NRAK-**
Copy link
Member

Choose a reason for hiding this comment

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

is this ok? in the config/newrelic.yml you are changing NEW_RELIC_API_KEY for NEW_RELIC_LICENSE_KEY

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the config change is actually not related with our TF setup, it's a fix for the new_relic config. It requires both, licence and API keys.

@@ -0,0 +1,524 @@
{
"name": "Activerecord - ${app_name}",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"name": "Activerecord - ${app_name}",
"name": "ActiveRecord - ${app_name}",

Copy link
Member

@santib santib left a comment

Choose a reason for hiding this comment

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

I think we could merge it as it is and we can fix/tune it as we start using it 👌

ty for this work

@santib santib requested review from jiv and a team August 4, 2025 15:29
Copy link

@jiv jiv left a comment

Choose a reason for hiding this comment

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

This looks great! My only concern is that there's no remote state for Terraform. All resources will be tracked using local state (created by the person who runs the terraform commands and saved locally). This means that if anyone else wants to update the NewRelic resources, Terraform won't know that there are already resources created and will create new ones.

You can configure remote state using an S3 bucket and a DynamoDB table, it's not a big deal and it's a huge win. If this is something you think it's worth it, let me know and we can discuss further.

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.

4 participants