This describes using New Relic's staging and production environments.
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.
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.
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.
api_key differ between staging and production. These will need to be manually changed when promoting your integration to production.
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):
For the .NET agent, edit the configuration file to set:
For the PHP agent, edit the configuration file so that the service tag has the host attribute: