Skip to content

Commit

Permalink
chore add syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
brnhensley committed Apr 27, 2024
1 parent 5c7b807 commit f678482
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This example describes how to add New Relic to your GAE flex app by installing t
1. Add the Java agent dependencies to the project's `target` directory when the project is built, when you [download and unzip all Java agent components](/docs/agents/java-agent/frameworks/maven-installation-java#h2-zip).
2. After adding the Java agent dependencies to the `pom.xml`, build your application by running:

```
```sh
mvn clean install
```
3. Check your project's `target` directory to find the app's `WAR` file and an unzipped `newrelic` directory.
Expand All @@ -77,9 +77,9 @@ This example describes how to add New Relic to your GAE flex app by installing t
id="configure-app-yaml"
title="3. Configure your app.yaml"
>
The [app.yaml](https://cloud.google.com/appengine/docs/flexible/java/configuring-your-app-with-app-yaml) configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains:
The [`app.yaml`](https://cloud.google.com/appengine/docs/flexible/java/configuring-your-app-with-app-yaml) configuration file is required for a GAE flexible environment app with a custom runtime. At a minimum, make sure it contains:

```
```yml
env: flex
runtime: custom
```
Expand All @@ -91,7 +91,7 @@ This example describes how to add New Relic to your GAE flex app by installing t
>
The [Dockerfile](http://docs.docker.com/engine/reference/builder/) defines the Docker image to be built and is required for a GAE flexible environment app. In the following Dockerfile example code, the `newrelic.yml` and `catalina.sh` files have been configured locally, to replace those already copied to the Docker image. (You can add your [New Relic license key](/docs/apis/intro-apis/new-relic-api-keys/#ingest-license-key) directly to your Dockerfile, or use an environment variable in your `docker run` command.)

```
```dockerfile
# base Tomcat image to build Docker image from
FROM tomcat:8.5.14-jre8

Expand All @@ -109,7 +109,7 @@ This example describes how to add New Relic to your GAE flex app by installing t
# update Java agent yml with license_key and app_name and copy to image
ADD newrelic.yml ${NEWRELIC_HOME}

# update catalina.sh with <a href="/docs/agents/java-agent/installation/include-java-agent-jvm-argument#tomcat-catalinash">-javaagent:/path/to/newrelic.jar</a> and copy to image
# update catalina.sh with -javaagent:/path/to/newrelic.jar and copy to image
ADD catalina.sh /usr/local/tomcat/bin/
```
</Collapser>
Expand All @@ -120,7 +120,7 @@ This example describes how to add New Relic to your GAE flex app by installing t
>
To build a Docker image that runs Tomcat with the New Relic Java agent monitoring your deployed application WAR, run the following command. Be sure to include the period at the end of the code, to indicate the current directory contains the build files.

```
```sh
docker build -f Dockerfile -t newrelic-tomcat .
```

Expand All @@ -133,13 +133,13 @@ This example describes how to add New Relic to your GAE flex app by installing t
>
1. To deploy your Docker image to your [initialized GAE flexible environment](https://cloud.google.com/sdk/docs/initializing), run the following command:

```
```sh
gcloud app deploy
```
2. Wait until the deployment completes.
3. To open the app in the browser, run the following command:

```
```sh
gcloud app browse
```
4. To view your GAE flex app data in New Relic, go to the [APM <DoNotTranslate>**Summary**</DoNotTranslate> page](/docs/apm/applications-menu/monitoring/apm-overview-page).
Expand All @@ -154,7 +154,7 @@ If you create a custom runtime, your app must be able to handle a large number o

<DoNotTranslate>**Recommendation:**</DoNotTranslate> Configure your `app.yaml` to [disable health checks](https://cloud.google.com/appengine/docs/flexible/java/configuring-your-app-with-app-yaml#health_checks) by adding:

```
```yml
health_check:
enable_health_check: False
```
Expand All @@ -166,7 +166,7 @@ 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](https://cloud.google.com/appengine/docs/flexible/java/debugging-an-instance).
* To redirect New Relic Java agent logs to [Stackdriver](http://cloud.google.com/logging/docs/view/logs_viewer_v2) in the [Cloud Platform Console](https://cloud.google.com/compute/docs/console), change the `newrelic.yml`file to:

```
```yml
log_file_name: STDOUT
```
* To view the logs, use the [Cloud Platform Console's Log Viewer](https://cloud.google.com/appengine/docs/flexible/php/writing-application-logs).

0 comments on commit f678482

Please sign in to comment.