Skip to content

This is a simple Flask App that allows you test Open Telemetry capabilites!

Notifications You must be signed in to change notification settings

luke6Lh43/flask-app-otel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple Flask application that allows you test Open Telemetry capabilites.

This projects consits of following components:

  • Frontend service (Flask)
  • Backend service (Flask)

❗ Frontend and Backend services are instrumented to send traces to OTel collector via Python opentelemetry-instrument library (auto-instrumentation). Please check Dockerfile to see exact command used for instrumentation.

  • MySQL database
  • OpenTelemetry collector
  • Jaeger
  • Zipkin
  • Optionally any commercial backend of your choice (e.g. AppDynamics)

Please see below steps to quickly run this test setup on Minikube on your local machine:


1. Building Docker images.

docker build -t flask-app-otel-frontend ./frontend

docker build -t flask-app-otel-backend ./backend


2. Loading images to Minikube.

minikube image load flask-app-otel-frontend:latest

minikube image load flask-app-otel-backend:latest


3. Deploying containers to Kubernetes and exposing frontend service.

kubectl create -f ./k8s/flask-app-otel.yaml

kubectl create -f ./k8s/mysql.yaml

minikube service flask-app-otel-frontend-svc --url


4. Deploying OTel collector.

kubectl create -f ./k8s/otel-collector.yaml


5. Deploying Jaeger and exposing service.

kubectl create -f ./k8s/cert-manager.yaml

kubectl create namespace observability

kubectl create -f ./k8s/jaeger-operator.yaml -n observability

kubectl create -f ./k8s/jaeger.yaml

minikube service jaeger-query --url


6. Deploying Zipkin and exposing service.

kubectl create -f ./k8s/zipkin.yaml

minikube service zipkin-svc --url

About

This is a simple Flask App that allows you test Open Telemetry capabilites!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published