The OpenTelemetry Demo is an example application published by the OpenTelemtry CNCF project. It implements an Astronomy shop in a set of microservices in different languages with OpenTelemetry enabled, intended to be used as an example of OpenTelemetry instrumentation and observability. The Tracetest team has made several key contributions to this project, including providing a full suite of end to end tests.
Want to run tests against the OpenTelemetry Astronomy Shop without installing it? Click the link below and we will add you to our
tracetest-demo organization and give you access to the
opentelemetry-demo org as an engineer. You can run and create your own tests!
We will provide a full recipe below for running the full demo as well as running the associated Tracetests via Docker. Here are other references you may find useful:
- Source Code: https://github.com/open-telemetry/opentelemetry-demo
- Running it locally in Docker: Instructions
- Running on Kubernetes: Instructions
Tracetest is part of the official testing harness in the latest version of the OpenTelemetry Demo. Read more in the OpenTelemetry docs, here.
Or, check out the hands-on workshop on YouTube!
Running the OpenTelemetry Astronomy Shop Demo in Docker
- Docker Compose v2.0.0+
- 4 GB of RAM for the application
Get and run the demo
Clone the Demo repository:
git clone https://github.com/open-telemetry/opentelemetry-demo.git
Change to the demo folder:
Run Docker Compose to start the demo:
docker compose up --no-build
--no-buildflag is used to fetch released docker images from ghcr instead of building from source. Removing the
--no-buildcommand line option will rebuild all images from source. It may take more than 20 minutes to build if the flag is omitted.
- If you're running on Apple Silicon, run
docker compose build[^1] in order to create local images vs. pulling them from the repository.
Verify the web store and Telemetry
Once the images are built and containers are started you can access:
- Web store:
- Feature Flags UI:
- Load Generator UI:
- Jaeger UI:
The Tracetest tests for the OpenTelemetry Demo can be found in the official repo here:
- Instructions to run (also shown below in this recipe): Running Tracetest Tests
- Full source of all tests: Source
To run the entire Test Suite of trace-based tests, run the command:
docker compose run traceBasedTests
To run tests for specific services, pass the name of the service as a parameter (using the folder names located here:
make run-tracetesting SERVICES_TO_TEST="service-1 service-2 ..."
docker compose run traceBasedTests "service-1 service-2 ..."
For instance, if you need to run the tests for
payment-service, you can run them with:
make run-tracetesting SERVICES_TO_TEST="ad-service payment-service"
Tracetest will be started on http://localhost:11633 as part of running these tests and you can view any of the tests, Test Suites, prior runs, or create and run your own tests. It is a great testbed to explore Tracetest!
- Add item into shopping cart: Simulate a user choosing an item and adding it to the shopping cart.
- Check shopping cart content: Simulate a user choosing different products and checking the shopping cart later.
- Checkout: Simulates a user choosing a product and later doing a checkout of that product, with billing and shipping info.
- Get recommended products: Simulates a user querying for recommended products.
This demonstration environment consists of a series of microservices, handling each aspect of the store, such as Product Catalog, Payment, Currency, etc.