- Docker and Docker Compose
- A Lightstep Observability account: create a free account here.
- A Lightstep Access Token for the Lightstep Observability project you would like to use.
Running the OpenTelemetry Demo App
Clone the repo
git clone https://github.com/lightstep/opentelemetry-demo.git
Edit the OpenTelemetry Collector Config file.
This file allows you to configure the OpenTelemetry Collector with your own Observability back-end. This case, otelcol-config-extras.yml is already configured to use Lightstep as the back-end. All you need to do is add your Lightstep Access Token to the file, to be able to send traces to Lightstep.
src/otelcollector/otelcol-config-extras.ymlfor editing using your favourite editor. The file looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# extra settings to be merged into OpenTelemetry Collector configuration # do not delete this file exporters: logging: logLevel: debug otlp/ls: endpoint: ingest.lightstep.com:443 headers: "lightstep-access-token": "<lightstep_access_token>" service: pipelines: traces: receivers: [otlp] processors: [batch] exporters: [logging, otlp/ls] metrics: receivers: [otlp] processors: [batch] exporters: [logging, otlp/ls]
Launch the sample app
If you’re not already in the repo root:
Run Docker compose. If you’re on an x86-64 machine (i.e. Intel or AMD-based, non-Apple Silicon), run the command below. If you’re running the Demo App for the first time, it will download all of the Docker images first. This may take several minutes.
docker compose up --no-build
If you’re on an Apple Silicon machine, you will need to build all images from source using the command below, as the images hosted in the GitHub Container Registry (GHCR) are built and optimized for x86-64 machines. This can take upwards of 20 minutes.
docker compose build docker compose up
Once the app is up and running, you will see text continuously scrolling down the screen. This is expected. Sample output looks something like this:
The Webstore app can now be accessed here: http://localhost:8080
See the Traces in Lightstep