TNS
VOXPOP
Will JavaScript type annotations kill TypeScript?
The creators of Svelte and Turbo 8 both dropped TS recently saying that "it's not worth it".
Yes: If JavaScript gets type annotations then there's no reason for TypeScript to exist.
0%
No: TypeScript remains the best language for structuring large enterprise applications.
0%
TBD: The existing user base and its corpensource owner means that TypeScript isn’t likely to reach EOL without a putting up a fight.
0%
I hope they both die. I mean, if you really need strong types in the browser then you could leverage WASM and use a real programming language.
0%
I don’t know and I don’t care.
0%
Containers / Observability / Operations

Run OpenTelemetry on Docker

The OpenTelemetry project has created demo services to help cloud native community members better understand cloud native development practices.
Jun 20th, 2023 8:30am by
Featued image for: Run OpenTelemetry on Docker

The OpenTelemetry project offers vendor-neutral integration points that help organizations obtain the raw materials — the “telemetry” — that fuel modern observability tools, and with minimal effort at integration time.

But what does OpenTelemetry mean for those who use their favorite observability tools but don’t exactly understand how it can help them? How might OpenTelemetry be relevant to the folks who are new to Kubernetes (the majority of KubeCon attendees during the past years) and those who are just getting started with observability?

The OpenTelemetry project has created demo services to help cloud native community members better understand cloud native development practices and test out OpenTelemetry, as well as Kubernetes, observability software, container environments like Docker, etc.

At this juncture in DevOps history, there has been considerable hype around observability for developers and operations teams, and more recently, much attention has been given to help combine the different observability solutions out there in use through a single interface, and to that end, OpenTelemetry has emerged as a key standard.

Learning Curve

Observability and OpenTelemetry, while conceptually straightforward, do require a learning curve to use. To that end, the OpenTelemetry project has released a demo to help. It is intended to both better understand cloud native development practices and to test out OpenTelemetry, as well as Kubernetes, observability software, etc., the project’s creators say.

OpenTelemetry Demo v1.0 general release is available on GitHub and on the OpenTelemetry site. The demo helps with learning how to add instrumentation to an application to gather metrics, logs and traces for observability. There is heavy instruction for open source projects like Prometheus for Kubernetes and Jaeger for distributed tracing. How to acquaint yourself with tools such as Grafana to create dashboards are shown. The demo also extends to scenarios in which failures are created and OpenTelemetry data is used for troubleshooting and remediation. The demo was designed for the beginner or the intermediate level user, and can be set up to run on Docker or Kubernetes in about five minutes.

The stated goals for the OpenTelemetry demo the project team communicated are:

  • Provide a realistic example of a distributed system that can be used to demonstrate OpenTelemetry instrumentation and observability.
  • Build a base for vendors, tooling authors, and others to extend and demonstrate their OpenTelemetry integrations.
  • Create a living example for OpenTelemetry contributors to use for testing new versions of the API, SDK, and other components or enhancements.

OpenTelemetry and Docker

In this tutorial, we look at how to run the OpenTelemetry demo in a Docker environment. Let’s get started.

The prerequisites are:

To note, if you are running Docker in Windows, you need to make sure that you have Admin privileges activated to deploy the OpenTelemetry demo in Microsoft PowerShell (yet another Windows aggravation).

We first clone the repo:

Navigate to the cloned folder:

Run Docker Compose (–no-build) and start the demo:

Head over to your Docker Desktop if you are on Windows and you should see the OpenTelemetry container ready to go in the dashboard:

Access the OpenTelemetry-Demo-Main and watch the Demo metrics data live:

And that is it. Now the fun can start!

Getting the Demo to run on Docker is, of course, just the beginning. There are loads of possibilities available to do more with the Demo that will likely be the subject of future tutorials.

This includes setting up the Astronomy Shop eCommerce demo application, which the maintainers of the project describe as an example of an application that a cloud native developer might be responsible for building, maintaining, etc.:

Several pre-built dashboards for the eCommerce application are available,  such as this one for  Grafana. It is used to track latency metrics from spans for each endpoint:

Feature Flags

Features flags, such as the recommendationCache feature flag, will initiate failures in the code that can be monitored with the panel using Grafana or Jaeger (Jaeger is used here):
Here is a list of access options once the images are built and the containers are running:

Once the images are built and containers are started you can access:

Long Way

This OpenTelemetry demo project has come a long way. While bugs can exist, of course, that is why GitHub is there in part so you can help this project become even better than it already is. The demo GitHub page also offers a number of resources to get started.

In a future tutorial, stay tuned for the steps to get the Astronomy Shop eCommerce demo application up and running and view all the fabulous metrics provided with OpenTelemetry with a Grafana panel.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Docker.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.