With New Relic's Node.js agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in APM and browser monitoring.
This document explains how to add New Relic to your GAE flex app using either of these methods:
- Google App Engine's "native mode" installation with a standard GAE runtime
- Docker installation using a custom runtime
To use Google App Engine's "native mode" installation with your Node.js app:
Optional: Set environment variables to configure the Node.js agent's GAE
Use the Google Cloud SDK's
gcloudcommand line tool to deploy GAE apps. To deploy your Node.js app to your initialized GAE flexible environment, run the following command:
gcloud --project new-relic-apm-nodejs app deploy
Google App Engine automatically includes your Node.js app's
newrelic.js configuration file in the deployed package. Wait until the deployment completes, then view your GAE flex app data in the APM Summary page.
See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by building a custom runtime for Docker. You can deploy the app without any special configuration.
For more information about deploying and configuring your Node.js app in the GAE flexible environment, see:
Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL
If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in APM.
If you notice performance issues, disable GAE health checks. In your
Use these resources to troubleshoot your GAE flex environment app:
To connect to the GAE instance and start a shell in the Docker container running your code, see Debugging an instance.
- log_file_name: STDOUT
To view the logs, use the Cloud Platform Console's Log Viewer.
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.