Stan’s Robot Shop – a Sample Microservice Application

Instana is an active supporter of Open Source, we are members and contributors to a number of projects including: Open Tracing, Cloud Native Computing Foundation and Byte Buddy. Additionally the language sensors that the Instana agent uses are all Open Source on Github. Continuing with our commitment to Open Source we have just released Stan’s Robot Shop, also on Github.

This is a simple example microservices application for use as a sandbox to play with orchestration and/or monitoring/observability. As the name implies it is a simple ecommerce storefront featuring some of Stan’s friends, it includes: a product catalogue, user repository, shopping cart and order pipeline. These technologies have been used in creating the application:

  • AngularJS (1.x)
  • Nginx
  • NodeJS (Express)
  • Java (Spark Java)
  • Python (Flask)
  • Golang
  • MongoDB
  • RabbitMQ
  • Redis
  • MySQL

The key design consideration was to be small enough to run on a developer’s laptop but still have enough complexity to be interesting and not just a “Hello World” example. Just 2GB of memory is required to run this using docker-compose or minikube/minishift. Of course you can also deploy it to a cloud service that supports containers such as: Google Compute, AWS ECS/EKS and OpenShift. Future articles will cover these deployment scenarios in more detail.


Discovered stack

The web page is a Single Page Application written using AngularJS (1.x), its resources are served by Nginx which also acts as a reverse proxy for the backend microservices. Those microservices are written in different languages using various frameworks, providing a wide range of example scenarios. MongoDB is used as the data store for the product catalogue and the registered users. MySQL is used for the look up of the shipping information. Redis is used to hold the active shopping carts. The order pipeline is processed via RabbitMQ.

Discovered services

The code already has any required Instana components installed, making it very easy to start monitoring the application with Instana, you just have to install the agent on the platform. Instana End User Monitoring is also preconfigured, you just need to add your unique key to the environment of the Nginx container.


For more detailed instructions see the README in the Git repository. You will need to have Docker installed. First of all clone the Git repository.

$ git clone

Now change directory to the one just created by the clone. If you want to build from the source:

$ docker-compose build

The latest images are available ready built on Docker Hub so you could just run the application locally and pull the images:

$ docker-compose up

The application will take a little while to download the images and start all the services. Once it is running you can access the web application on http://localhost:8080/

shop front

There is an existing registered user with the credentials “user/password”, you can register additional ones, the shop also supports anonymous shopping; order history is not kept for anonymous users.

Monitoring with Instana

To see the application discovered and monitored with Instana, you just have to install the agent. At the moment the agent is not supported on Mac if you are running the application locally via docker-compose. Future articles will cover deployment to other environments such as Kubernetes, OpenShift, Mesosphere, etc. From the Instana dashboard select Management Portal from the drop down menu at the top right.


From the Management Portal select Install Agent, then copy and paste the Docker command line from the right of the screen. It will be already filled in with all the correct details, an example is below.

docker run \
--detach \
--name instana-agent \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /dev:/dev \
--volume /sys:/sys \
--volume /var/log:/var/log \
--privileged \
--net=host \
--pid=host \
--ipc=host \
--env="INSTANA_AGENT_KEY=<your key here>" \
--env="INSTANA_AGENT_ENDPOINT=<geo end point>" \
--env="INSTANA_AGENT_ZONE=Robot-Shop" \

Tip: Add the environment variable INSTANA_AGENT_ZONE to have the discovered infrastructure show up in the dashboard in its own group.

End User Monitoring

The required Javascript fragment will be automatically added to the page if you supply an EUM key for the web container. In the Instana dashboard select Websites from the main top navigation, then Add Website from the top right. This will show you the Javascript fragment with your key included. Copy the key and paste it into the docker-compose.yaml file, you will see there is already a placeholder there for it. Restart the application.

Load Generation

Load generation for the application is not started automatically, by navigating around the shop with your browser you can generate load and see how quickly those clicks are captured and become available in the Instana dashboard. There is not any load generation facility for the web application but there is included a load generation utility for the microservices. Under the load-gen directory edit the script and change the value of HOST to point to where Stan’s Robot Shop is running.

Have Some Fun

What are you waiting for? Go and have fun with Stan’s Robot Shop and keep checking back here for new articles and tutorials all about microservices featuring Stan’s retail empire.

Play with Instana’s APM Observability Sandbox

Announcement, Product, Thought Leadership
Kubernetes, Kubernetes Monitoring and KubeCon I have vivid memories of the first KubeCon that I attended – it was in Austin, and it SNOWED. I was also pretty blown away by the...
Conceptual, Featured, Thought Leadership
Building scalable systems has become more accessible over the past decade thanks to immutable infrastructure, containers, and orchestration platforms such as Kubernetes. As the complexity of these applications continues to accelerate the...
Developer, Featured, Thought Leadership
Building reliable services is not an easy task. With looking into creating a resilient microservices based infrastructure, things won’t get any simpler. As part of this blog post series I’d like to...

Start your FREE TRIAL today!

As the leading provider of Automatic Application Performance Monitoring (APM) solutions for microservices, Instana has developed the automatic monitoring and AI-based analysis DevOps needs to manage the performance of modern applications. Instana is the only APM solution that automatically discovers, maps and visualizes microservice applications without continuous additional engineering. Customers using Instana achieve operational excellence and deliver better software faster. Visit to learn more.