• /
  • EnglishEspañol日本語한국어Português
  • EntrarComeçar agora

Install New Relic Java agent in GAE flexible environment

With APM's Java 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 , , and dashboards.

This document explains how to add New Relic to your GAE flex app by configuring a custom runtime, and gives an example of deploying a Tomcat app with Docker.

Importante

The New Relic Java agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's "native mode" installation.

Build a custom runtime using Docker

See Google's documentation for building custom runtimes. There are many ways to build a custom runtime that contains the New Relic Java agent (for example, using Tomcat). In general, to build a custom runtime:

  1. Set up your application and install necessary GAE-related dependencies for custom runtimes. Include the New Relic Java agent in the project.
  2. Configure Maven or Gradle as applicable.
  3. Configure the app.yaml file.
  4. Configure the Dockerfile.
  5. Build the Docker image.
  6. Deploy the Docker image to the initialized GAE flexible environment.
  7. Recommendation: Disable GAE health checks.

For more information about deploying and configuring your Java app in the GAE flexible environment, see:

GAE flex example with Tomcat

This example describes how to add New Relic to your GAE flex app by installing the New Relic Java agent, building a custom runtime, and deploying an application WAR to Tomcat. Be sure to install the Java agent as necessary for your specific app server.

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 APM. To avoid adding additional instrumentation overhead and skewing throughput for your application, we recommend that you disable the health check.

Recommendation: Configure your app.yaml to disable health checks by adding:

health_check:
enable_health_check: False

Get Java agent troubleshooting logs from GAE

Use these resources to troubleshoot your GAE flex environment app:

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.