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
Clone the lab repository.
$git clone https://github.com/newrelic-experimental/error-inbox-lab-material.git
In your cloned repo, open .env to customize your environment variables.
DOCKERHUB_USER=usernameTAG=latestCLUSTER_NAME=localPUBLIC_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.
From the root directory of your application, export these variables.
$source .env
Now you're ready to run your app!
Build and run your application.
$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.
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.