An open API service indexing awesome lists of open source software.

https://github.com/jtyr/otel-demo

Demo of how to use Open Telemetry instrumentation for traces and metrics.
https://github.com/jtyr/otel-demo

argocd golang grafana loki otel prometheus promtail tempo tracing

Last synced: 5 months ago
JSON representation

Demo of how to use Open Telemetry instrumentation for traces and metrics.

Awesome Lists containing this project

README

          

[![Actions status](https://github.com/jtyr/otel-demo/actions/workflows/on-push-master-publish-chart.yml/badge.svg)](https://github.com/jtyr/otel-demo/actions/workflows/on-push-master-publish-chart.yml)
[![Docker build](https://img.shields.io/docker/cloud/build/jtyr/otel-demo?label=Docker%20build&logo=docker)](https://hub.docker.com/repository/docker/jtyr/otel-demo)

OTEL Demo
=========

This is a demo of how to use [Open Telemetry](https://opentelemetry.io/) (OTEL)
instrumentation for traces and metrics.

Table of contents
-----------------

- [Usage](#usage)
- [Docker Compose](#docker-compose)
- [Kubernetes](#kubernetes)
- [Manual installation](#manual-installation)
- [Automated installation](#automated-installation)
- [Testing of the app](#testing-of-the-app)
- [License](#license)
- [Author](#author)

Usage
-----

### Docker Compose

Run Grafana Tempo, Grafana Tempo Web UI and the App frontend/backed via Docker
Compose:

```shell
docker-compose up
```

Query the `main` endpoint:

```shell
curl http://localhost:8080
```

Query the `metrics` endpoint:

```shell
curl http://localhost:8080/metrics
curl http://localhost:8888/metrics
```

### Kubernetes

Install local Kubernetes cluster using [K3D](https://k3d.io):

```shell
export KUBECONFIG=~/.kube/kind_test1
k3d cluster create test1 -p '80:80@loadbalancer' -p '443:443@loadbalancer'
```

#### Manual installation

Add all required [Helm](https://helm.sh) repos:

```shell
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add otel-demo https://jtyr.github.io/otel-demo
helm repo update
```

Install [Kube Prometheus Stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack):

```shell
cat <