• Log inStart now

On August 31, 2024, we're EOLing developer.newrelic.com. All relevant content has been migrated to docs.newrelic.com.

Spin up your application

5 min

lab

This procedure is part of a lab that teaches you how to manage errors using Errors Inbox. If you haven't already, check out the lab introduction.

Geek's Movie Shop is a web application that consists of several interconnected microservices:

  • cart
  • catalogue
  • dispatch
  • payment
  • ratings
  • shipping
  • user

You've instrumented these services with New Relic to monitor their performance and gain full visibility across your stack.

Before you begin using Errors Inbox to proactively find and manage errors in your app, you need to spin up these services in a local docker network. To mimic the traffic of real users, you run a special service that automatically generates load.

Set up your environment

Step 1 of 4

Clone the lab repository.

bash
$
git clone https://github.com/newrelic-experimental/error-inbox-lab-material.git
Step 2 of 4

In your cloned repo, open .env to customize your environment variables.

DOCKERHUB_USER=username
TAG=latest
CLUSTER_NAME=local
PUBLIC_URL=http://docker-for-desktop:8888
NEW_RELIC_LICENSE_KEY=<YOUR_LICENSE_KEY>

Replace <YOUR_LICENSE_KEY> with your real license key. Your services use this key to write telemetry data to New Relic.

Step 3 of 4

From the root directory of your application, export these variables.

bash
$
source .env

Now you're ready to run your app!

Step 4 of 4

Build and run your application.

bash
$
docker compose build
$
docker compose up
[+] Building 96.1s (103/103) FINISHED
=> [username/rs-shipping:latest internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 784B 0.0s
=> [username/rs-mongodb:latest internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 95B 0.0s
=> [username/rs-ratings:latest internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.11kB 0.0s
=> [username/rs-dispatch:latest internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 398B 0.0s
=> [username/rs-catalogue:latest internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 187B 0.0s
=> [username/rs-web:latest internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 234B 0.0s
=> [username/rs-cart:latest internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 187B 0.0s
=> [username/rs-payment:latest internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 227B 0.0s
=> [username/rs-mysql:latest internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 422B 0.0s
=> [username/rs-user:latest internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 187B 0.0s
=> [username/rs-loader:latest internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 187B 0.0s

Once it's up and running, the loader generates traffic to your services.

loader traffic

Leave this running so you'll see your telemetry data in New Relic.

lab

This procedure is part of a lab that teaches you how to manage errors using Errors Inbox. Now that you're running a local version of your app, it's time to set up Errors Inbox.

Copyright © 2024 New Relic Inc.

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