This describes using New Relic's staging and production environments.
Working in staging
The staging environment is provided as a sandbox for partners to develop, debug, and exercise the integration between their systems and New Relic's. When developing an integration, follow these guidelines:
- Refrain from creating test accounts on the production server. Do as much test account and subscription creation as possible on the staging server. The activity metrics on the production system are closely watched. Quantities of test account activity in production cause distortions in these metrics and discomfort among metrics watchers.
- Do not use the Partnership Owner account for monitoring applications. Create an account under the partnership and use this account for application monitoring.
There are a number of differences between the two environments, staging and production. These differences include server addresses and some partnership values. As these values will need to be changed when migrating from staging to production, it is helpful to keep track of them.
The table provided below lists the items that change between staging and production. Where these are common to all integrations, they are filled in. Values specific to your integration are blank. You may find it convenient to keep track of the values specific to your partnership in this table.
Minimizing changes between staging and production
Some simple practices will minimize the effort required to migrate from staging to production. Use product names rather than product ids when referencing products in your API calls.
For example:
- Use
product_name
= "Enterprise." - Avoid
product_id
= "41."
The numeric ID values for products differ between staging and production; the name value does not. Using the numeric ID to designate a product will require a change when moving to production; using the name descriptor will not.
Partnership name
, id
and api_key
differ between staging and production. These will need to be manually changed when promoting your integration to production.
Code | Staging | Production |
---|---|---|
| ||
| ||
| ||
| staging.newrelic.com | rpm.newrelic.com |
| staging-collector | collector |
Agents and the staging collector
When testing reporting data using the New Relic staging server, the agents must be directed to the staging collectors. When promoting your integration to production, these parameters can simply be removed and the collectors will point to the production servers by default.
New Relic agent | Configuration file edits |
---|---|
Java and Ruby | In the Java or Ruby agent configuration file, add this parameter to your production settings (or to your staging environment if appropriate):
|
.NET | For the .NET agent, edit the configuration file to set:
|
PHP | For the PHP agent, edit the configuration file so that the service tag has the host attribute:
|