Once the agent and configuration file have been installed, New Relic's Python agent can automatically monitor applications that reside in the GAE flexible environment. Wait until the deployment completes, then view your GAE flex app data in the New Relic APM Overview page.

The Google Cloud SDK also provides the gcloud command line tool to manage and deploy GAE apps.

2. Configure your app.yaml

The app.yaml configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains:

env: flex
runtime: custom

3. Configure a Dockerfile

The Dockerfile defines the Docker image to be built and is required for a GAE flexible environment app. The following Dockerfile example shows the Python agent installed for an application served with gunicorn.

These procedures are similar to New Relic's Python quick start guide. The Dockerfile will contain customer-specific code, including Python version, installation requirements, etc).

Recommendation: Disable health checks

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 /_ah/health.

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 New Relic APM.