OpenTelemetry demo
Last updated
Last updated
Observability is an essential part of any microservice architecture. But when services are built using many divergent technologies, consistent observability becomes a challenge.
OpenTelemetry is a collection of tools that enables developers and DevOps to simplify and standardize the collection of telemetry data.
To demonstrate how OpenTelemetry works for a complex microservices-based application, the OpenTelemetry developers maintain an example application called the OpenTelemetry Astronomy Shop Demo.
The demo is in constant development, with contributors regularly adding more services. This may seem overengineered, but this is the point: To provide a realistic demonstration of how to improve observability of a complex distributed system.
In this tutorial, we'll look at how to host a snapshot of this application on Release.
We created a fork of the OpenTelemetry Astronomy Shop Demo, hosted in our Awesome Release GitHub organization.
We modified this fork by including the following files to simplify adding the demo as a Release application:
Filename | Purpose |
---|---|
The simplest way to add this demo application to Release is to use the pre-generated application template and corresponding default environment variables.
You'll need an existing Release account with a cluster and a domain.
Follow the steps below to deploy the demo application:
Add a new Release application.
Under Analyze your repository, skip to the Next Step.
Select .release/application_template.yaml
from the Select release template file dropdown.
Double-check your context
and domain
values, then click Next Step.
Select .release/environment_variables.yaml
from the Select release env template file dropdown, then click Next Step.
Click Next Step again to skip over the build arguments form.
Click Deploy your app!
Release will now build and deploy your OpenTelemetry demo. This could take up to 20 minutes the first time.
Visit the environment detail page.
Click the frontend proxy URL to see the demo shop.
Reach the demo's public services by visiting the URLs below (substitute your frontend proxy hostname):
Webstore: https://your-frontend-proxy-hostename.tld/
Grafana: https://your-frontend-proxy-hostename.tld/grafana/
Feature Flags UI: https://your-frontend-proxy-hostename.tld/feature/
Load Generator UI: https://your-frontend-proxy-hostename.tld/loadgen/
Jaeger UI: https://your-frontend-proxy-hostename.tld/jaeger/ui/
We provide the steps we used to generate a new application_template.yaml
file for this application as reference.
Release can create an application based on an existing Docker Compose file. At the time of writing, Release can import the OpenTelemetry app file, requiring only a few minor changes to the resulting application template:
Service names should not contain underscores.
Service names are used by Release to create service-specific environment variables. These variables sometimes clash with expected variables from existing apps.
In Release, create a new application.
Select your repository and the branch containing your new compose.yaml
file. Click Next Step.
From the Select files dropdown, pick only docker-compose.yaml
.
Click Start Analysis. Release will read the docker-compose.yaml
file and show a list of services.
Add otelcol
as a dependency to the kafka
service, then click Next Step.
Release will create a complete Application Template. Double-check the context
and domain
values for your account.
Change kafka
to kafkaservice
for each occurrence, except the image name.
Change all occurrences of ffs_postgres
to ffspostgres
.
Add container port 5432 to the ffspostgres
service:
Add container ports 9092 and 9093 to the kafkaservice
service:
Fix the kafkaservice
health check by changing kafkaservce
hostname to localhost
:
Remove the extra current directory selector (./
) from configmap
repo paths.
Mount extra Grafana configuration files:
Click Next Step.
Edit the generated environment variables file, by removing PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
key and value from the frontend
service.
Add a new entry for PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
under the mapping
key:
Change the value of FEATURE_FLAG_SERVICE_HOST
to featureflagservice
.
Click Next Step.
Skip the build arguments form by clicking Next Step again.
Click Deploy your app!
Release will now build and deploy your demo application.
Reach the demo's public services by visiting the URLs below (substitute your frontend proxy hostname):
Webstore: https://your-frontend-proxy-hostename.tld/
Grafana: https://your-frontend-proxy-hostename.tld/grafana/
Feature Flags UI: https://your-frontend-proxy-hostename.tld/feature/
Load Generator UI: https://your-frontend-proxy-hostename.tld/loadgen/
Jaeger UI: https://your-frontend-proxy-hostename.tld/jaeger/ui/
.release/application_template.yaml
A complete application template, generated by Release
.release/environment_variables.yaml
Default environment variables, generated by Release
.release.yaml
This file indicates where to find the templates above